Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iI have been messing around with GetTimeZoneInformation function is there a better way get the standard name or daylight name other than what I have done below?

Function GetTimeZoneInfo
Select All      Help
int c  i=GetTimeZoneInformation(&tz)
str sn dn UTCm UTCh
sel i
,case 0 ;;;Unknown
,out "Timezone ID Unknown"
,case 1 ;;standard time
,UTCm= tz.Bias+tz.StandardBias
,UTCh= tz.Bias+tz.StandardBias/60
,out UTCm
,out UTCh
,for c 0 31
,,if(tz.StandardName =0)
,,sn.formata("%c" tz.StandardName[c])
,out sn    
,case 2;;daylight savings Time
,UTCm= tz.Bias+tz.DaylightBias
,UTCh= tz.Bias+tz.DaylightBias/60
,out UTCm
,out UTCh
,for c 0 31
,,if(tz.DaylightName[c] =0)
,,dn.formata("%c" tz.DaylightName[c])
,out dn

MSDN shows to do this in c++ 
wprintf(L"%s\n", tziTest.StandardName);
but if i remember correctly  qm cannot do the same. would appreciate any help


out "%S" &tz.DaylightName
Thank you Gintaras would have taken me a while to figure that out.

Forum Jump:

Users browsing this thread: 1 Guest(s)