Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And how far behind Frankfurt are they?
No, it's not as simple as it looks: if I'm lucky enough to be in New York, or I have the admin rights to tell my machine that it's been shipped to Manhattan, I can call the API for GetTimeZoneInformation. That'll retrieve a time difference relative to Greenwich Mean Time and, if I'm somewhere strange and foreign, it'll even apply the daylight saving adjustments. But the only locale it can query is 'here', and that's usually London. Except when people have to run my code in New York, Frankfurt or Hong Kong, Sydney, Seoul, Tokyo and San Francisco. And they definitely don't have administrator privileges: all they want to do is retrieve everything prior to a locally-defined cutoff date and time. It is possible to enumerate the registry for Time Zone keys under HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows NT \CurrentVersion \Time Zones But how do I read the 'TZI' subkey, a REG_BINARY, into a TIME_ZONE_INFORMATION user-defined type in VB? And if I did, would it be any use to me? Anyone else come up with alternative solutions? The USA has time zones, too: they don't move with the seasons like ours, but a lot of stateside developers must have met this issue for data replication across state boundaries. It can't all be hardcoded! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Time calculations for Scheduled Time vs. Actual Time Worked | Excel Discussion (Misc queries) | |||
straight time, time and a half, and double time | Excel Discussion (Misc queries) | |||
Calculate Ending time using Start Time and Elapsed Time | Excel Worksheet Functions | |||
verify use of TIME Function, Find Quantity Level compare to time-d | Excel Discussion (Misc queries) | |||
Calculating days & time left from start date/time to end date/time | Excel Worksheet Functions |