Timezone

Timezone

Postby Marc Vanzegbroeck » Sat Jan 21, 2006 11:34 am

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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Sun Jan 22, 2006 8:44 am

Marc,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Sun Jan 22, 2006 11:14 am

Antonio,

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

Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby James Bott » Sun Jan 22, 2006 8:03 pm

Can we see your code for this?
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Marc Vanzegbroeck » Sun Jan 22, 2006 10:24 pm

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

Code: Select all  Expand view  RUN
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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Mon Jan 23, 2006 8:26 am

Marc,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 12 guests