Re: Time Zones + GMT
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 42386
interpreted = N
texte = Clint Davis wrote:> Since my server is located in the US Central Time Zone, I'm storing a time> zone preference in my database as the offset of Central Time (+1 for> Eastern, +0 for Central, -1 for Mountain, -2 Pacific). I need to use this> offset to calculate the correct date and time for the time zone specified by> the client in the database.Why don't you store the offsets as relative to GMT, because then you will always have a positive offset?> > I think I'm going to need to convert to GMT and back or something like that,> but I'm not sure. I want to display the results of the math as:> Weekday, Month DD, YYYY | HH:MM:am/pm.> [math time]localtime={[date %X]}+{[youroffset]:00:00}-{[offset]:00:00}[/math]Note that this will not work around midnight for anyone west of you, since you will be reporting the wrong date. Look in the archives for my MIMEHeaders.inc include file which has some convoluted logic to get this right...It would be very nice is WebDNA was extended to include GMT math, though this relies on the underlying gmtime() implementation of the O/S...John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Clint Davis wrote:> Since my server is located in the US Central Time Zone, I'm storing a time> zone preference in my database as the offset of Central Time (+1 for> Eastern, +0 for Central, -1 for Mountain, -2 Pacific). I need to use this> offset to calculate the correct date and time for the time zone specified by> the client in the database.Why don't you store the offsets as relative to GMT, because then you will always have a positive offset?> > I think I'm going to need to convert to GMT and back or something like that,> but I'm not sure. I want to display the results of the math as:> Weekday, Month DD, YYYY | HH:MM:am/pm.> [math time]localtime={[date %X]}+{[youroffset]:00:00}-{[offset]:00:00}[/math]Note that this will not work around midnight for anyone west of you, since you will be reporting the wrong date. Look in the archives for my MIMEHeaders.inc include file which has some convoluted logic to get this right...It would be very nice is WebDNA was extended to include GMT math, though this relies on the underlying gmtime() implementation of the O/S...John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
John Peacock
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Just Testing (1997)
Seeking Better Display of results... (1997)
[WebDNA] CDATA in XML = blank value (2015)
Is [variable] a Number? (2007)
secret [cmd] variable? (2004)
File Upload to IIS Stops WebDNA Execution? (2003)
Sandbox DB permissions (2005)
Help Encrypt/Decrypt eMail (2003)
2 questions (2000)
Unauthorized User trouble (1998)
WebCat cannot handle compatible search parameters? (1997)
Shop till you drop dead on the avenue ... (1997)
WebCat on Intel Core 2 macs anyone? (2007)
mail list (1998)
Artwork (1997)
WebCatalog Hosting (1996)
emailer settings and control questions (1997)
[WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (2011)
Test (2003)
Need help with emailer- 2 issues (1997)