Home » U++ Library support » U++ Core » Time::Set(int64 scalar) unexpected results
Re: Time::Set(int64 scalar) unexpected results [message #40735 is a reply to message #40733] |
Tue, 10 September 2013 21:04   |
|
Alboni wrote on Tue, 10 September 2013 20:54 | time_t can be both 32 or 64 bit
| Yes, it is implementation defined. It doesn't even have to start at 1970 :http://en.cppreference.com/w/c/chrono/time_t | Arithmetic type capable of representing times.
Although not defined, this is almost always a integral value holding the number of seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC, corresponding to POSIX time.
| So it would be safer not to rely on it too much, especially if you want the app to be platform independent.
Alboni wrote on Tue, 10 September 2013 20:54 | and the rest work ok. just not the year.
| All the years are quite similar, unless it is a leap year. I'd say that just changing the year after using Time::Set() with timestamp might mess up something due to the complex rules of leap days (see Date::Set(int64) to get an idea how complex this stuff is ).
Honza
[Updated on: Tue, 10 September 2013 21:04] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 27 21:15:43 CEST 2025
Total time taken to generate the page: 0.04044 seconds
|