Hi,
I've been getting different results on my local server and remote server:
Both similars are very similar (apache, php, mysql, etc).. except that the local server here at home is on Windows XP and the remote is unix (in USA)
To simplify my problem for you guys, I have this code:
stamp2date.php
<?php
$b = date("Y-m-d",$_GET['stamp']);
echo "$b";
?>
Obviously, it converts a unix stamp to date in YYYY-MM-DD format..
The weird thing is, sometimes my stamp2date routine produces different results!
Here are the stamps producing different results:
1115017924
LOCAL = MAY 2, 2005
REMOTE = MAY 2, 2005
(They are the same as SHOULD BE)
1112284800
LOCAL = April 01, 2005
REMOTE = March 31, 2005
1113926400
LOCAL = April 20, 2005
REMOTE = April 19, 2005
The last two unix timestamps produces DIFFERENT RESULTS! How come?!
The Remote server seems to be a day late!
I've tried different servers already..same results.
Can ya'll try converting those on your servers??
What could be wrong here?
I was thinking TIMEZONES of the servers.. but those unix timestamp arent TIMEZONE dependent.. They represent a CERTAIN and SPECIFIC DATE based on the seconds passed since epox..
Also, SOME TIME STAMPS produce the same results (Like the first one) and some dont..
im mystified.
tea