CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 ___ Display the current date and time in another time zone

Print topic Send  topic

Author Message
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 ?
View profile  Send private message
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.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.