Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Location
    Bangkok, Thailand
    Posts
    10

    Grin Obtaining user's time zone information...

    It's a pity that System.GetTime is not returning time zone information in addition to current system time...

    How to obtain user's time zone information?

    Probably we can use Kernel32.dll and GetTimeZoneInformation function?

    Something like:
    DLLResult = DLL.CallFunction("Kernel32.dll", "GetTimeZoneInformation", "TZI", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
    Please correct me if I am wrong...

  2. #2
    Join Date
    Jun 2005
    Posts
    470
    if you need the GMT offset, it's available in the registry

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\TimeZoneInformation\

    Read ActiveTimeBias (current offset with DST taken into account) or Bias (offset with DST excluded)

    Offset is in minutes, so something like 0xFFFFFF88 is -2 hours

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts