pqwoerituytrueiwoq
December 10th, 2013, 01:21 AM
seems the new version of php in 13.10 does not like not setting the time zone when you call the date function
i could just get the time zone from the client, but i am using the number as a id and i don't want to allow duplicates
extremely unlikely to have more than one time zone for this use, but rather not let it me possible.
i came up with this code (don't care about windows server support)
date_default_timezone_set('UTC');
$GMT=intval(exe('date +%z',true))*36;
$FILENAME=date("M_j_Y~G-i-s",filemtime("$CANDIR/".$file)+$GMT);
is there a better way to do this? i would like it to work on slightly older php versions also (>=5.0) as well on multiple distros like centOS, debian, fedora, etc.
i could just get the time zone from the client, but i am using the number as a id and i don't want to allow duplicates
extremely unlikely to have more than one time zone for this use, but rather not let it me possible.
i came up with this code (don't care about windows server support)
date_default_timezone_set('UTC');
$GMT=intval(exe('date +%z',true))*36;
$FILENAME=date("M_j_Y~G-i-s",filemtime("$CANDIR/".$file)+$GMT);
is there a better way to do this? i would like it to work on slightly older php versions also (>=5.0) as well on multiple distros like centOS, debian, fedora, etc.