Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

getTimeZoneInformation API Call

34 views
Skip to first unread message

michael

unread,
Jul 20, 1999, 3:00:00 AM7/20/99
to

Hi all.
I need some help.
I'm trying to call API function getTimeZoneInformation()
It requieres structure like TIME_ZONE_INFORMATION {
long Bias;
char StandardName[ 32 ];
SYSTEMTIME StandardDate;
long StandardBias;
char DaylightName[ 32 ];
SYSTEMTIME DaylightDate;
long DaylightBias;
}
I've defined a PB structure like
s_time_zone_information from structure:
long il_bias
character ich_astandartname[32]
s_systemtime istr_standartdate
long il_standatbias
character ich_daylightname[32]
s_systemtime istr_daylightdate
long il_daylightbias

where s_systemtime:
global type s_systemtime from structure
integer ii_Year
integer ii_Month
integer ii_DayOfWeek
integer ii_Day
integer ii_Hour
integer ii_Minute
integer ii_Second
integer ii_Milliseconds
end type
( syntax from export)

s_systemtime works normal, API functions like getlocaltime, getsystemtime
return correct results.
But getTimeZoneInformation() returns garbage after first character array.

Can somebody help me?
Thanks

Michael.


Eric Aling [TeamSybase]

unread,
Jul 20, 1999, 3:00:00 AM7/20/99
to

Hi,

The systemtime structure should be of LONGs, because a WORD in 32bit OS is 4
bytes, not 2.

HTH
--
Met vriendelijke groet,

- Eric Aling [TeamSybase], Cypres Informatisering bv, The Netherlands
Eric's Home & PB Site @ http://utopia.knoware.nl/users/cypr115

michael <mic...@aiks.com> wrote in message
news:#nx9Xmr0#GA....@forums.sybase.com...

michael

unread,
Jul 21, 1999, 3:00:00 AM7/21/99
to

>Hi,
>
>The systemtime structure should be of LONGs, because a WORD in 32bit OS is
4
>bytes, not 2.
>
>HTH
>--
>Met vriendelijke groet,
>
>- Eric Aling [TeamSybase], Cypres Informatisering bv, The Netherlands
> Eric's Home & PB Site @ http://utopia.knoware.nl/users/cypr115


Hi.
Thanks for replying.
I tried to replace int by long but situation became even worse -
GetSystemTime and GetLocalTime stoped working also.
But I've fixed this problem by changing char[32] by char[64]
(i guess., wchar type contains 2 bytes).


Michael

Eric Aling [TeamSybase]

unread,
Jul 21, 1999, 3:00:00 AM7/21/99
to
Hi,

Yep, that's true. BTW, indeed a WORD is a 16bit integer. DWORD is 32bit.
Just looked it up so you already did that right. Glad you've got it working.

--
Met vriendelijke groet,

- Eric Aling [TeamSybase], Cypres Informatisering bv, The Netherlands
Eric's Home & PB Site @ http://utopia.knoware.nl/users/cypr115

michael <mic...@aiks.com> wrote in message
news:7de6I$40#GA....@forums.sybase.com...

0 new messages