I found a problem:
date("D M j Y",1079712000),
server 1: Fri Mar 19 2004
server 2: Fri Mar 20 2004
Why different server get different date with the same timestamp?
Server 1 and server 2 have different IP.
I found a problem:
date("D M j Y",1079712000),
server 1: Fri Mar 19 2004
server 2: Fri Mar 20 2004
Why different server get different date with the same timestamp?
Server 1 and server 2 have different IP.
Different locations?
of course diff locations, even diff timezone. that's the reason?
you can use strftime function for solve this problem.
try this to verify that it is a timezone issue:
date("D M j Y e",1079712000);
the 'e' will add a timezone identifier.
Thanks, but add e
to date, but get this result:
Code: date("D M j Y e",1079712000)
Output: Fri Mar 19 2004 e
Code: date("D M j Y",1079712000)
Output: Fri Mar 19 2004
I check PHP Mannual, not found the e
format.
I also try
echo strftime ( "%a %b %d %G " ,1079712000);
the same result: Fri Mar 19 2004.
On the other server's output still is: Fri Mar 20 2004.
I think the reason is the servers have diff timezone settings. Anyway thanks guys!