Skip to content
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

[Fixed] Summer time not correctly handled #25

Open
seuck opened this issue Jun 20, 2019 · 2 comments
Open

[Fixed] Summer time not correctly handled #25

seuck opened this issue Jun 20, 2019 · 2 comments
Assignees
Labels

Comments

@seuck
Copy link

seuck commented Jun 20, 2019

Timezones data are adapted using Moment library to local time.
This happens for timezone and zone name but not for offset. As a result, a timezone supporting time summer time, like CET (+1), is transformed during summer in CEST but keeping the wrong offset +1 instead of +2.

Actual transformation:

zoneObj.zonename = momentObj.zoneName();
zoneObj.timezone = momentObj._z.name

Missing transformation:

zoneObj.offset = momentObj._z._offset/60

I applied this fix in my local set-up and works well.
Tested with:

  • London (supporting summer time)
  • Madrid (supporting summer time)
  • Minsk (summertime doesn't exist for this timezone)
  • Argentina/Salta (south hemisphere, it's winter there: hola amigos!)
@seuck seuck changed the title Summer time not correctly handled [Fixed] Summer time not correctly handled Jun 20, 2019
@kevalbhatt
Copy link
Owner

kevalbhatt commented Jun 20, 2019

@seuck Thanks for finding the issue

If possible could you create the PR?

@kevalbhatt
Copy link
Owner

@seuck As of I know moment would give you update zone object.

why don't you use _offset directly?

momentObj._z._offset/60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants