setTimestamp pencereleri sürümü

0 Cevap php

Ben Unix üzerinde çalışan bir php komut dosyası var ama windows üzerinde çalıştırmak gerekir.

setTimestamp sadece Unix ve ben pencereleri eşdeğeri gerekir.

http://php.net/manual/en/datetime.settimestamp.php

Example:

foreach($config['feeds'] as $feed){
    // in case we didn't save a last checked date, set it to sometime in the 70's
    $last_date = new DateTime();
    $last_date->setTimestamp(0);
    $last_date_save = 0;
    // the feeds are identified in the cache file by the hash of their url.
    $feed_hash = sha1($feed['url']);

    if(isset($stats[$feed_hash]['lastPubDate'])){
        if($config['debug'] > 0) echo "feed had lastpubdate\n";
        $last_date = new DateTime();
        $last_date->setTimestamp($stats[$feed_hash]['lastPubDate']);
    }

}

Herhangi bir fikir?

0 Cevap