php - Why does time() not return the same value as strtotime("2013-08-28 06:38:47") -
i ran time() @ 6:38:47 , returned different value strtotime of same time. why this?
it should absolutely return same value. run code:
<?php $time = time(); $string = date('y-m-d h:i:s', $time); $strtotime = strtotime($string); print "time = $time\n"; print "string = $string\n"; print "strtotime = $strtotime\n"; print "difference = ".($time-$strtotime)."\n"; ?>
my output right now:
time = 1377686839 string = 2013-08-28 12:47:19 strtotime = 1377686839 difference = 0
are getting difference this? post test code, maybe there's mistake in there.
Comments
Post a Comment