FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Timezone
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Timezone
Posted: 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
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Timezone
Posted: Sun Jan 22, 2006 08:44 AM

Marc,

The Win32 API function to use is GetTimeZoneInformation().

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Timezone
Posted: Sun Jan 22, 2006 11:14 AM

Antonio,

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

Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Timezone
Posted: Sun Jan 22, 2006 08:03 PM

Can we see your code for this?

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Timezone
Posted: Sun Jan 22, 2006 10:24 PM
It was posted on the old FW NG:
Here it is:

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
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Timezone
Posted: Mon Jan 23, 2006 08:26 AM

Marc,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion