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
Re: Time::Set(int64 scalar) unexpected results [message #40731 is a reply to message #40730] Tue, 10 September 2013 20:37 Go to previous messageGo to previous message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
Little test: See http://www.unixtimestamp.com/index.php for times

#include <Core/Core.h>
#include <time.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	time_t scalar = time(0); // seconds since 1/1/1970 00:00:00
	Time back;
	back.Set(scalar);
		
	Cout() << "The time is: " << asctime(localtime(&scalar)) << "\n"; // oldskool functions
	Cout() << "Scalar = " << scalar << "\n";
	Cout() << "Converted back = " << back << "\n";
}

[Updated on: Tue, 10 September 2013 20:55]

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 May 18 01:51:24 CEST 2024

Total time taken to generate the page: 0.02856 seconds