New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict timezone results with datetime #46
Comments
from core.py
I'm not clear about why using constant VAR timezone which is from the module |
Please take a look if free. Thanks! |
Good catch -- I'm pretty sure this has to do with Daylight Saving Time going into effect this past weekend. I'm getting a similar error to your code: from datetime import datetime
from dateutil import tz, zoneinfo
import moment
a = moment.utcnow()
print(a)
a.timezone('America/Los_Angeles')
print(a)
tz_pst = tz.gettz('America/Los_Angeles')
print(datetime.now())
d = datetime.now(tz=tz_pst)
print(d) And the output is indeed wrong (
|
Thanks for your reply and confirmation. Yes. I thought that the wrong timezone info in Moment may be caused by using the hard code If possible, we may need to get the real timezone from self._date. |
The below code produced conflict results when I compared it with datetime
output:
The text was updated successfully, but these errors were encountered: