G
Gauri
This is the time I have in GMT
time: 6/26/2007 12:00:26 AM
I want to convert it to epoch format in CST timezone:
Using the timegm() function, this is the answer I get:
GMT_epochtime: 1182859226
Is CST_epochtime same as GMT_epochtime for any given time?
Also when I try to convert the above epoch time back to readable time,
using function gmtime()
($r_sec,
$r_min,
$r_hour,
$r_day,
$r_month,
$r_year,
$r_weekday,
$r_yearday,
$r_isdst) = gmtime($GMT_epochtime);
I get $r_hour = 12.
I'm expecting 00 since the time given above is 12 AM.
Where am I going wrong? else how do I know if $r_hour =12 is AM or PM?
-Gauri
time: 6/26/2007 12:00:26 AM
I want to convert it to epoch format in CST timezone:
Using the timegm() function, this is the answer I get:
GMT_epochtime: 1182859226
Is CST_epochtime same as GMT_epochtime for any given time?
Also when I try to convert the above epoch time back to readable time,
using function gmtime()
($r_sec,
$r_min,
$r_hour,
$r_day,
$r_month,
$r_year,
$r_weekday,
$r_yearday,
$r_isdst) = gmtime($GMT_epochtime);
I get $r_hour = 12.
I'm expecting 00 since the time given above is 12 AM.
Where am I going wrong? else how do I know if $r_hour =12 is AM or PM?
-Gauri