U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Getting timezone or UTC offset?
Re: Getting timezone or UTC offset? [message #23478 is a reply to message #23477] Thu, 22 October 2009 09:32 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3460
Registered: August 2008
Senior Veteran
Hello Jeremy_c

With an small change in GetUtcTime they work well. Here it is the changed version:

Time GetUtcTime() {
	time_t gmt = time(NULL);
	struct tm *utc = gmtime(&gmt);
	return Time(utc->tm_year + 1900, utc->tm_mon + 1, utc->tm_mday, 
		utc->tm_hour, utc->tm_min, utc->tm_sec);
}

Best regards
Koldo


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bug?: Command line arguments passing problem (Windows)
Next Topic: VC2010
Goto Forum:
  


Current Time: Sun Jun 14 13:35:08 GMT+2 2026

Total time taken to generate the page: 0.00700 seconds