New submission from Dima Tisnek: $ python2 -c 'import datetime; print datetime.time(10, 44, 11).strftime("%s")' -2208955189
$ python3 -c 'import datetime; print (datetime.time(10, 44, 11).strftime("%s"))' -2208955189 So apparently, datetime.time(...).strftime("%s") semantically "seconds since unix epoch" assumes Jan 1, 1900 for missing date part. However datetime module doesn't allow subtracting time objects, i.e. no assumption of date is made, where "same date" chould be reasonable. ---------- components: Extension Modules messages: 226224 nosy: Dima.Tisnek priority: normal severity: normal status: open title: odd result for datetime.time.strftime("%s") type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22321> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com