469,613 Members | 1,262 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

modied now() with time zones

TB
Hi All:

I´m developing a web app to be used several time zones away from where the
server is located. I would therefore like to develop a function that
substitutes now() both for dates / times, takes into account the time
difference and whether or not summer summer is in force, as well as date
corrects when the server time and the "local time" is on different sides of
midnight (For example "2006-02-01 03:00:00" CET would be would "2006-01-31
20:00:00" EST during the summer).

The server is on Central European Time (CET) and the app will be used in a
area using Eastern Standard Time (EST), the latter being seven hours behind
when summer time is in force but only six behind during the winter.

So regardless of the time of the year I would like to be able to do things
like this with a function called "nowlocal()":

(pseudocode)

dim currenttime, current as string
currenttime = hour(nowlocal()) & ":" & Minute(nowlocal())

currentdate = Day(nowlocal()) & "/" & Month(nowlocal()) & "/"
Year(Nowlocal())

etc, etc

Any suggestions will be highly appreciated.

Thanks

TB
Apr 4 '06 #1
0 1231

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.