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 » Time::Set(int64 scalar) unexpected results
Time::Set(int64 scalar) unexpected results [message #40730] Tue, 10 September 2013 20:14 Go to previous message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Core/SSL change to let MinGW
Next Topic: Binary file to JSON
Goto Forum:
  


Current Time: Sat Apr 20 13:27:22 CEST 2024

Total time taken to generate the page: 0.05231 seconds