I'm handling some date manipulations, and I found my numbers were way off. I did a test, and got some weird results.
I'm running this off my local machine, which is set to Pacific Standard Time (both the time, and the region). I created this test:
//get GMT timestamp
$GMTstamp = gmmktime();
//get local timestamp
$testLocalStamp = mktime();
//calculate diff between local and and GMT timestamp
$testdiff = $testLocalStamp - $GMTstamp;
//extract time format from timestamp, and print it
$testdifftime = strftime("%Y.%m.%d...%H:%M.%S", $testdiff);
echo($testdifftime);
My understanding, is that $testdifftime should end up being Jan 1st, 1970 @ 8:00. (because of the nix timestamp) Thus indicating a time diff of 8hrs between PST and GMT.
What I get instead, is Jan 1st, 1970 @ 1:00... indicating 1 hour difference between server and GMT.
Am I missing something, because I sure feel like I am.
Thanks for the help.