Veritabanına kaydedilen tarih için doğru unix zaman damgasını eklerken sorun yaşıyorum.strtotime ve tarih doğru çıkmıyor
$activeWorkRow['WorkDate'] = "9/24/2015 1:45:53 PM";
$locateDate = $activeWorkRow['WorkDate'];
$locateDate = str_replace('/', '-', $locateDate);
//$locateDate = date('m-d-Y', strtotime($locateDate));
//$locateDate = strtotime(date($locateDate));
echo $locateDate."<br>";
Çıktı:
9-24-2015 1:45:53 PM
Sonraki:
$locateDate = $activeWorkRow['WorkDate'];
$locateDate = str_replace('/', '-', $locateDate);
$locateDate = date('m-d-Y', strtotime(locateDate));
//$locateDate = strtotime(date($locateDate));
Çıktı: Ben bu yüzden başkalarıyla karşılaştırabilirsiniz unix zaman damgası almak için çalışıyorum
12-31-1969
. MySQL kullanıyorsanız
ne zaman dilimi? –
Orta saat diliminde –