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
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.
Was this an intentional omission?
The text was updated successfully, but these errors were encountered:
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!
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.
Was this an intentional omission?
The text was updated successfully, but these errors were encountered: