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 gruszczy
Recipients belopolsky, ezio.melotti, gruszczy, ryles
Date 2011-02-27.22:24:20
SpamBayes Score 7.695707e-05
Marked as misclassified No
Message-id <1298845461.17.0.876887137728.issue5979@psf.upfronthosting.co.za>
In-reply-to
Content
But this is exactly how strptime in C. Consider this:

#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(){
    
    char buf[255];
    struct tm tm;
    
    memset(&tm, 0, sizeof(tm));
    strptime("123", "%m%d", &tm);
    strftime(buf, sizeof(buf), "%d %b %Y %H:%M", &tm);
    printf("%s\n", buf);
    
    return 0;
    
}

This produces output:

03 Dec 1900 00:00


Shouldn't it stay consistent with how C function works?
History
Date User Action Args
2011-02-27 22:24:21gruszczysetrecipients: + gruszczy, belopolsky, ezio.melotti, ryles
2011-02-27 22:24:21gruszczysetmessageid: <1298845461.17.0.876887137728.issue5979@psf.upfronthosting.co.za>
2011-02-27 22:24:20gruszczylinkissue5979 messages
2011-02-27 22:24:20gruszczycreate