Timezone

Post Reply
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Timezone

Post by Marc Vanzegbroeck »

I was wondering if I can check the timezone with FW?
I am looking for u function that is returning something like GMT +01:00

Thanks,
Marc
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marc,

The Win32 API function to use is GetTimeZoneInformation().
regards, saludos

Antonio Linares
www.fivetechsoft.com
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

Antonio,

Thanks, I have use Treg32 to read the info from the registry.

Marc
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Can we see your code for this?
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

It was posted on the old FW NG:
Here it is:

Code: Select all

function timezone()
   Local oReg, ret_val
   oReg := TReg32():New(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\TimeZoneInformation", .f. )
   ret_val := oReg:Get( "Bias", 0 )
   oReg:Close()
   ret_val := Round( ret_val / 60, 0 ) * -1
Return ret_val
Marc
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marc,

Ok, we have added it to the FW library. Thanks.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply