Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Getting timezone or UTC offset?
Re: Getting timezone or UTC offset? [message #24307 is a reply to message #23446] Sun, 10 January 2010 08:57 Go to previous messageGo to previous message
Shire is currently offline  Shire
Messages: 41
Registered: September 2006
Location: Russia, Yamal peninsula
Member
IMHO, GetUTCTime() and GetSysTime() is not quite correct.

Better and correct name for GetSysTime is GetLocalTime.

GetUTCTime() works wrong with Time::AsFileTime() - if time will be not local, this method returns invalid file time.

One of workarounds of this problem is typedef int64 (or incapsulate it to struct) as UTC time offset type. GetUTCTime() will return this value, which can be converted to/from local Time by Time::Set()/Get() and will be good for time serialization to present same time in different time zones.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bug?: Command line arguments passing problem (Windows)
Next Topic: VC2010
Goto Forum:
  


Current Time: Sun May 12 18:26:06 CEST 2024

Total time taken to generate the page: 0.02619 seconds