Ross Lagerwall <[email protected]> added the comment:
It outputs:
SAST
LMT
LMT
An equivalent C program to the first test:
"""
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
int main() {
time_t t;
struct tm *tmp;
t = time(NULL);
tmp = localtime(&t);
char str[200];
strftime(str, sizeof(str), "%Z", tmp);
puts(str);
struct tm tmp2;
tmp2.tm_sec = 0;
tmp2.tm_min = 0;
tmp2.tm_hour = 0;
tmp2.tm_mday = 1;
tmp2.tm_mon = 1;
tmp2.tm_year = -1;
tmp2.tm_wday = -1;
tmp2.tm_yday = -1;
tmp2.tm_isdst = -1;
mktime(&tmp2);
t = time(NULL);
tmp = localtime(&t);
strftime(str, sizeof(str), "%Z", tmp);
puts(str);
return 0;
}
"""
Outputs (as expected):
SAST
SAST
Perhaps it's not mktime?
----------
_______________________________________
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