This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rosslagerwall
Recipients flox, python-dev, rosslagerwall
Date 2011-11-01.16:45:48
SpamBayes Score 2.1183782e-06
Marked as misclassified No
Message-id <1320165949.42.0.855509415865.issue13309@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2011-11-01 16:45:49rosslagerwallsetrecipients: + rosslagerwall, flox, python-dev
2011-11-01 16:45:49rosslagerwallsetmessageid: <1320165949.42.0.855509415865.issue13309@psf.upfronthosting.co.za>
2011-11-01 16:45:48rosslagerwalllinkissue13309 messages
2011-11-01 16:45:48rosslagerwallcreate