On Thu, Jan 9, 2014 at 12:27 PM, Roy Smith <r...@panix.com> wrote: > Anyway, I discovered that Python 3.3's datetime has a .timestamp() > method. Yeah. Finally. Exactly what the world had needed for years. > Then I kept reading and found: > > Note: There is no method to obtain the POSIX timestamp directly from a > naive datetime instance representing UTC time.
In my experiments (admittedly with 3.4, not 3.3, but I don't know that there's any difference), I was able to round-trip a time_t through datetime with no problems. Why not simply use a UTC datetime instead of a naive one? What do you gain by using a naive datetime? You seem to know what timezone it's in anyway. ChrisA -- https://mail.python.org/mailman/listinfo/python-list