You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
datetime_tz.fromtimestamp has no optional tz parameter #5
As a drop-in replacement for the std lib datetime module I was surprised that the datetime_tz.fromtimestamp method doesn't allow an optional tz parameter like it's standard library counterpart.
I think it may have been an oversight, the tz parameter is however a little confusing. POSIX timestamps are always in UTC, which means the two are equivalent;
datetime_tz.fromtimestamp(ts, "US/Pacific")
# is identical todatetime_tz.fromtimestamp(ts).astimezone("US/Pacific")
It will probably take me a while to fix the issue myself, I'd welcome patches though!
Activity
mithro commentedon Mar 4, 2014
I think it may have been an oversight, the tz parameter is however a little confusing. POSIX timestamps are always in UTC, which means the two are equivalent;
It will probably take me a while to fix the issue myself, I'd welcome patches though!
Merge pull request #5 from dave42/improve_windows_territory_handling