Apr 012011

This function returns the local GMT offset. It’s just a handy wrapper so I don’t have to remember all this “stuff” when I need the info.

//
// Returns the current local GMT offset
//
int GetGMT()
{
  TIME_ZONE_INFORMATION tzinfo;
  GetTimeZoneInformation(&tzinfo);
  return -(tzinfo.Bias/15);
}

Leave a Reply

(required)

(required)