Antoine Pitrou <[email protected]> added the comment:
It is definitely a glibc issue. Here's a C snippet to reproduce:
"""
#include <time.h>
#include <stdlib.h>
int main() {
time_t t;
struct tm tmp;
char str[200];
t = time(NULL);
tmp = *gmtime(&t);
tmp.tm_gmtoff = 0;
tmp.tm_zone = NULL;
strftime(str, sizeof(str), "%Z", &tmp);
puts(str);
t = -2461446500;
localtime(&t);
t = time(NULL);
tmp = *gmtime(&t);
tmp.tm_gmtoff = 0;
tmp.tm_zone = NULL;
strftime(str, sizeof(str), "%Z", &tmp);
puts(str);
return 0;
}
"""
Output:
CET
PMT
Calling localtime() or mktime() with a time largely in the past seems to
corrupt the glibc's internal time structures (the "char *tm_zone[]").
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13309>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com