On Fri, Aug 3, 2012 at 7:18 AM, Stanislav Frolov <frolosof...@gmail.com>wrote:

> Looks like localtime returns 3 hours instead of 4.
> And datetimes for current time_t:
> [...]Difference between gmtime and localtime is 4 hours. Bug? Feature?
>

Obviously a bug in the C library or a misconfiguration from your system.
Following the ISO and POSIX standards
http://pubs.opengroup.org/onlinepubs/009695299/functions/localtime.html

"The localtime() function shall convert the time in seconds since the Epoch
pointed to by timer into a broken-down time, expressed as a local time. The
function corrects for the timezone and any seasonal time adjustments. [CX]
  Local timezone information is used as though localtime() calls tzset()."


Juanjo

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to