• Welcome to Valhalla Legends Archive.
 

TimeZone

Started by l)ragon, May 13, 2010, 08:01 AM

Previous topic - Next topic

l)ragon

What is the equiv. to GetTimezineInformation in .Net.
When last I checked, I believe it was in "System.Time" which I guess was changed since 2002?
edit: For getting the Bias
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

RealityRipple

(DateTime.UtcNow - DateTime.Now).TotalMinutes

l)ragon

#2
My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\", "ActiveTimeBias", &H0UI)

doing it that way i need to add 60 to it, just want to call it and be done with it ;)

edit: my solution still dosent answer where that property went that was in the class lol.
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

Mystical

maybe the system.timezone class?

l)ragon

Quote from: Mystical on May 20, 2010, 11:59 PM
maybe the system.timezone class?
If you looked in that class you wouldent be saying maybe.
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

Yegg

Quote from: l)ragon on May 21, 2010, 06:37 AM
Quote from: Mystical on May 20, 2010, 11:59 PM
maybe the system.timezone class?
If you looked in that class you wouldent be saying maybe.
I looked at that class and similar classes and could not find anything to fit exactly what you're looking for. Hopefully I'm just missing something, because it seems odd that Windows API has something that does exactly what you need and .NET does not.

I found a few sites with .NET code that lead me to believe that the TIME_ZONE_INFORMATION structure is still what you would need to use.

l)ragon

Quote from: Yegg on May 21, 2010, 08:49 AM
Quote from: l)ragon on May 21, 2010, 06:37 AM
Quote from: Mystical on May 20, 2010, 11:59 PM
maybe the system.timezone class?
If you looked in that class you wouldent be saying maybe.
I looked at that class and similar classes and could not find anything to fit exactly what you're looking for. Hopefully I'm just missing something, because it seems odd that Windows API has something that does exactly what you need and .NET does not.

I found a few sites with .NET code that lead me to believe that the TIME_ZONE_INFORMATION structure is still what you would need to use.
Originaly
System.Time.CurrentTimeZone.Bias
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*