On Fri, Aug 3, 2012 at 7:18 AM, Stanislav Frolov <frolosofsky@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

"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()."


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)