On Thu, Jul 30, 2015 at 5:33 AM, Tim Peters <[email protected]> wrote:
> [...] > > You're using methods designed for interoperability with the C > language's ubiquitous "struct tm": > > http://pubs.opengroup.org/onlinepubs/007908775/xsh/time.h.html > > The meanings, and even the names of the fields, are identical between > Python and C. Actually the meanings of some fields are different -- C's tm_mon is 0-11, while Python's is 1-12; also, C's tm_year is "year - 1900" while Python's is the full 4-digit year (IIRC we had to change the latter in order to ward off Y2K issues). > A struct tm doesn't know microseconds from doughnuts. > That's why microseconds are missing here. But we could still add it. By now the similarity to C for various APIs is just there to help C programmers quickly get their bearings in Python, not a hard philosophical line in the sand. -- --Guido van Rossum (python.org/~guido)
_______________________________________________ Datetime-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/datetime-sig The PSF Code of Conduct applies to this mailing list: https://www.python.org/psf/codeofconduct/
