Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TimeZoneInfomation
#1
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
Code:
Copy      Help
TIME_ZONE_INFORMATION tz
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)
,,,break
,,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)
,,,break        
,,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
#2
dn.ansi(&tz.DaylightName)

or

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


Forum Jump:


Users browsing this thread: 1 Guest(s)