how to do time zone adjustment?

  • Thread starter Thread starter news.ms.com
  • Start date Start date
N

news.ms.com

Hi,

Any class in mfc that I can use to perform time zone adjustment? THanks.

Raymond.
 
news.ms.com said:
Hi,

Any class in mfc that I can use to perform time zone adjustment? THanks.

Depending on how much time zone adjustment you want, ie, truly
international, a few lines of code should suffice. There are some
complications when dealing with the U.S. where some states don't observe
DST, so timezone differences are 'different' during different times of year.
All of this is primarily and excuse to type the word 'different'. But that
was a joke.

If you're truly doing international time zoning, then you're gonna have to
figure out (you probably are already aware of this) all of those derned
middle eastern countries which sometimes have 30 minute and 45 minute zone
seperations.

Still, though, once you figure out your zones, you'd create a table or
matrix of geographic locations and a zone index #, and simply add or
subtract hours on the clock based on the zone index- with a clever
identifier for the pinko commie 30 minute, or non DST observing zones.

Paul
 
news.ms.com said:
Any class in mfc that I can use to perform time zone adjustment? THanks.

Time zones are stored in registry (HKLM/Software/.../Time Zones) (T.Z.
Editor)
Get/SetTimeZoneInformation() for the current one.
 
Back
Top