react-native-week-view
react-native-week-view copied to clipboard
Feature request: TimeZone support
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
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.
One global timezone support would be enough IMHO and should cover most use case.