react-native-week-view icon indicating copy to clipboard operation
react-native-week-view copied to clipboard

Feature request: TimeZone support

Open rdewolff opened this issue 3 years ago • 2 comments

Describe the feature you'd like Add an option to set the timezone of the calendar.

Options

Option 1 The simple option would be to offset our moment dates. Something like this could work when creating new moment var:

const m = moment()
m.utcOffset(+120) // set manually an offset to the desired timezone << make this a global option

Pro: easy to implement Con: not the cleanest

Option 2 We could use the moment-timezone library.

Example:

  var moment = require('moment-timezone')
  moment.tz.setDefault('Europe/Zurich')

Pro: clean Con: additional lib

rdewolff avatar Nov 07 '22 16:11 rdewolff

Would you need to handle events in different timezones? or just one global timezone

e.g. Event 1 in tzA, Event 2 in tzB, calendar displayed in tzC. Both events show "shifted" w/r to their hours, but we know they are from a different timezone.

pdpino avatar Nov 07 '22 16:11 pdpino

One global timezone support would be enough IMHO and should cover most use case.

rdewolff avatar Nov 11 '22 05:11 rdewolff