bigtoe
Posts: 115
|
Posted: 07/28/2004, 4:46 AM |
|
At the bottom of a web page I need to display the current date and time.
This date and time must come from the web server.
I could do this using the now() MySQL function.
The server is setup and located in the Pacific time zone, PDT.
But the web page users are in the Central time zone, CDT.
They want to see the current date and time in CDT.
So how I display the current date and time in CDT ?
|
|
|
RvR
|
Posted: 07/28/2004, 7:17 AM |
|
1. You must set component Data Type to Text
2. Parse datetime by strtotime() in UNIX timestamp (in seconds)
3. Decrease or increase hours by increase or decrease seconds
4. Format variable by date()
|
|
|
bigtoe
Posts: 115
|
Posted: 07/28/2004, 6:07 PM |
|
Will this take care of the daylight savings time?
Assuming that the web server is regularly doing a time sync with an ntp server.
|
|
|
|