Home » U++ Library support » U++ Core » Time::Set(int64 scalar) unexpected results
Time::Set(int64 scalar) unexpected results [message #40730] |
Tue, 10 September 2013 20:14  |
 |
Alboni
Messages: 216 Registered: January 2012 Location: Kajaani, Finland
|
Experienced Member |
|
|
This is about
void Date::Set(int scalar)
Assign a date that is stored in the numeric scalar.
and
void Time::Set(int64 scalar)
Assign a time that is stored in the numeric scalar.
When I assign a unix time with Time::Set, the year is 43 instead of 2013. The origin of that problem seems to be in Date::Set(int scalar)
Is this a bug or is the Upp timesystem not starting in 1970 but in the year 0? scalar values obtained from Time::Get() do work.
I fixed it in my program like this (for now) :
int64 unixtime = ..........
Time timestamp;
time.Set(unixtime);
time.year+=1970;
What would be the correct way to import a unix time?
[Updated on: Tue, 10 September 2013 20:40] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 27 21:33:09 CEST 2025
Total time taken to generate the page: 0.00364 seconds
|