qam4 / ebattles

Automatically exported from code.google.com/p/ebattles
1 stars 1 forks source link

Time is not handled properly. #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The PHP function time() gives the same value regardless the location at a 
given time.
It can be used to save times in SQL database.
No need to use GMT time!

The PHP function date() gives the date for the a given timestamp at the 
location of the server.
This means that for a given timestamp, the date will be different for 
different locations.
When it is 10AM EST (USA east coast), it is 3PM GMT, 4PM CET (France).
When displaying the date of a timestamp at the client location, we need to 
use:
date_client(timestamp) = date(timestamp + TIMEOFFSET)
TIMEOFFSET is the time difference in seconds between the client and the 
server. It is calculated by e107.

Original issue reported on code.google.com by frederic...@gmail.com on 7 Dec 2009 at 9:19

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r144.

Original comment by frederic...@gmail.com on 7 Dec 2009 at 9:49