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 » SetSysTime() or SetUtcTime()
SetSysTime() or SetUtcTime() [message #40214] Wed, 03 July 2013 18:42 Go to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello all

In Windows:

- GetSysTime(): Gets local time
- GetUtcTime(): Gets UTC time

However SetSysTime() sets the UTC time as it uses SetSystemTime(): See http://msdn.microsoft.com/en-us/library/windows/desktop/ms72 4942%28v=vs.85%29.aspx

This may produce errors.


Best regards
Iñaki
Re: SetSysTime() or SetUtcTime() [message #40234 is a reply to message #40214] Tue, 09 July 2013 07:36 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I believe it should rather be SetLocalTime, right?

Frankly, I do not thing it is such a good idea to have this in U++, as setting time requires admin rights, but if we do, I agree that it should be fixed...

Mirek
Re: SetSysTime() or SetUtcTime() [message #40238 is a reply to message #40234] Tue, 09 July 2013 09:08 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello Mirek

To follow the GetXXXTime() functions, SetSysTime() would have to be SetUtcTime(). Isn't it?


Best regards
Iñaki
Re: SetSysTime() or SetUtcTime() [message #40244 is a reply to message #40238] Wed, 10 July 2013 07:45 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Will, for starters I have changed to SetLocalTime, because I am not sure what time posix version (clock_settimt) in fact uses - documentation seems to be silent about it....
Previous Topic: Troubles compiling code with -fPIC
Next Topic: Bug in Stream::Pack
Goto Forum:
  


Current Time: Sat Apr 20 08:03:19 CEST 2024

Total time taken to generate the page: 0.04012 seconds