I'm trying to make a timetable for a festival. But I'm having issues converting the view to the right timezone (+2GMT). Anyone got a working timezone example? Should I format my input UNIX to the timezone (+2GMT)? Or use a standard and change the zone using moment.locale() ?
Hi, I believe you should use moment-timezone.
something like this:
import moment from 'moment-timezone'
moment.tz.setDefault(timezone)
items = [
{
start: moment(startTime).valueOf(),
end: moment(endTime).valueOf(),
}
]
<Timeline items={items} ... />
@mariusandra @kevinmeyvaert timezones and localisation seams to be recurring question. I think I should write a few words in the readme. Can you point me, what the problem for localisation here was? what are common problems?
@signalwerk it would be great to get some more clarity on what @mariusandra has posted above. Ideally a demo showing the timeline in UTC using moment-timezone would be the ultimate. To be completely conclusive, having the demo interactive with choosing a custom timezone would probably cover everything
To whomever wants to take this, you could create a codesandbox using this as a starting point then add a section to the examples/README.