time zones and daylight saving time 
Author Message
 time zones and daylight saving time

 wrote on 09 Oct 2002 in microsoft.public.scripting.VBScript:

Quote:
> The only possible solution I can think is to allow the user
> to select their time zone and store it in a cookie, but
> that is not ideal

> Any one got any ideas?

You would have to accout for al different forms of summertime with
different start and end dates, except if all our users live in Europe.

first solution, use client time, not ideal !

Second:

1 Give uk-time or utc?, at first logon, cookie corrected next logons.

2 Ask at every logon to klik if the given time is not the users time and
what time he livses in.

3 Store that as a timedifference in a cookie for next logon.

not ideal.

Third:

Go all the way and make/install/keep-updated a database with all the
possibilities.

not feasable?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)



Sun, 27 Mar 2005 17:40:25 GMT  
 time zones and daylight saving time
Hi,

All 32-bit Windows clients (Win95 and above) store time
zone information in the registry. The wshShell object can
be used to retrieve it.

The registry key is:
HKLM\System\CurrentControlSet\Control\TimeZoneInformation"

One value name is "Bias", which is the number of minutes
West of UTC. "ActiveTimeBias" is the same thing, but
taking into account DayLightSavings time. The numbers are
stored differently on Win9x clients and W2k/XP. I use the
following VBScript code to retrieve the bias in minutes,
no matter what client OS. The bias is added to local time
to get UTC (or subtracted from UTC to get local time).
(watch for line wrapping):

Set oShell = CreateObject("Wscript.Shell")
nBiasKey = oShell.RegRead
("HKLM\System\CurrentControlSet\Control\TimeZoneInformation
\ActiveTimeBias")
If UCase(TypeName(nBiasKey)) = "LONG" Then
  nBias = nBiasKey
ElseIf UCase(TypeName(nBiasKey)) = "VARIANT()" Then
  nBias = 0
  For k = 0 To UBound(nBiasKey)
    nBias = nBias + (nBiasKey(k) * 256^k)
  Next
End If

Richard

Quote:
>-----Original Message-----
> wrote on 09 Oct 2002 in

microsoft.public.scripting.vbscript:
Quote:
>> The only possible solution I can think is to allow the
user
>> to select their time zone and store it in a cookie, but
>> that is not ideal

>> Any one got any ideas?

>You would have to accout for al different forms of
summertime with
>different start and end dates, except if all our users
live in Europe.

>first solution, use client time, not ideal !

>Second:

>1 Give uk-time or utc?, at first logon, cookie corrected
next logons.

>2 Ask at every logon to klik if the given time is not the
users time and
>what time he livses in.

>3 Store that as a timedifference in a cookie for next
logon.

>not ideal.

>Third:

>Go all the way and make/install/keep-updated a database
with all the
>possibilities.

>not feasable?

>--
>Evertjan.
>The Netherlands.
>(Please change the x'es to dots in my emailaddress)
>.



Mon, 28 Mar 2005 01:45:41 GMT  
 time zones and daylight saving time

The problem with all solutions is the terminal services
bit, where the time is alway GMT regardless of where the
user is.
The final solution  is that we already manually update time
differences for our offices in the database, so it is
possible to adjust the time when doing inserts. It does
mean that the client sees a different time before saving
something, but refreshing the page gives the correct time.
Not ideal but as long as the user are warned it is workable.



Tue, 29 Mar 2005 17:36:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Daylight saving - winter time - summer time - time zone

2. Daylight saving - winter time - summer time - time zone

3. Daylight saving - winter time - summer time - time zone

4. Standard Time or Daylight Savings Time

5. detect daylight saving time

6. Daylight Saving Time

7. Time & Time Zones

8. Formatting Time to GMT when current Time Zone not known

9. Real time From Time Zone information

10. Time zone offset and day light saving.

11. Standard v. Daylight Savings Time Function

12. Daylight Savings Time Error

 

 
Powered by phpBB® Forum Software