mfc - can I abbreviated timezone names in windows? -


does know how abbreviated timezone name in windows?

i using code time zone name not getting abbreviated timezone.

time(&ltime); newtime = localtime(&ltime); strftime(sdate, 80,"%a, %d %b %y %h:%m:%s %z", newtime); 

output: fri, 16 aug 2013 14:45:27 india standard time

expected output fri, 16 aug 2013 14:45:27 ist

thanks,

there no universal standard time zone abbreviations. can review list here, there not listed or ambiguous.

for example, people use hast hawaii, while others use hst because care less aleutian islands in alaska (which a supposed represent).

also, values cst "central standard time" (usa), "china standard time", or "cuba standard time". est "eastern standard time" (usa), or "eastern standard time" (australia).

i go on day. point is, should use time zone abbreviations when showing time human, , when there other implied context location. if want 1 scenarios, need conditional logic in application, need careful avoid making false assumption offset can directly translated time zone or single abbreviation.

you might able come abbreviation full iana/olson time zone, need tzdb implementation - not native in c on windows. more details, see this question , answer.

there few specifications such rfc822 use time zone abbreviations, define small handful of them, , fixated on usa. tend not included on more modern or having global impact.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -