Skip to content

Correctly calculate local time for members taking into account "Daylight Saving Time" #3458

@maxceem

Description

@maxceem

Follow up form the issue #3457:

image

The issue is caused by the fact, that New Your supports "Daylight Saving Time", so the timezone offset vary during the year from GMT-4 to GMT-5:
image

While we are using static list of timezones with respective time shifts:
image

So we have to use a smarter way to calculate the current time in timezones. We have to use moment-timezone extension for moment library which we already use.

The most tricky thing here is to validate somehow, that moment-timezone can understand our list of timezones https://github.com/appirio-tech/react-components/blob/feature/connectv2/constants/timezones.js. So we don't come up with the situation, when for some timezones in our list moment-timezone cannot properly calculate the local time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions