Filip Gruszczyński <[email protected]> added the comment:
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?
----------
nosy: +gruszczy
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue5979>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com