timezone handling
See original GitHub issueHi I’d like to start off by saying how much i appreciate fullcalendar. It’s very important component for and saves a bunch of us a lot of hassle.
For past couple of days I was working with fullcalendar. One of important features I wanted to use was timezones switching and I have some feedback around that I’d like to share to contribute to web community.
It just happens that I have 4+ years experience working on software internationalization for one of major corps from mountain view and what struck me was the concept of ambiguously-zoned
datetime and timezone: false
option as there is no such thing as time without timezone… timezone is always there, it might be implied but it’s always there.
docs make a note that Because the browser does not know the timezone offset for every time in every timezone, when an event is modified
but with moment.timezone it’s not true, this information is available to you.
I seems to me that that concept had impact on design of callback signatures and make it a nightmare to work with.
I ended up using timezone: ‘local’ option which behaves correctly, but i still have to fight with extended moment objects.
I’d like to open a discussion how we could improve this situation
My proposal would be to
- remove timezone: false option - docs make a case where one would want to render events irrespectively from timezone - just hardcode it to
utc
and result will be exactly the same. - make the timezone: ‘local’ the new default, utc would be equally good, depends which use case we want to promote (global user vs render my stuff same way for everybody)
- remove all moment.js extensions and use vanilla moment.js objects - this one makes coding unpredictable as modified object behaves differently and concept of
ambiguously-zoned
datetime is flawed and redundant. start
andend
fullcalendar callbacks params would be moment.js objects- do not pass timezone as separate param to event source callback - it’s redundant
This would solve issues like #2780
I’d like to get some feedback on my proposal and work out a consensus on conceptual level before we head out and start implementing stuff.
Looking forward to hearing from you.
Regards and thanks again for your work !
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (9 by maintainers)
Top GitHub Comments
+1 Please send the timezone in dragging and dropping, sending different time data is wrong. Is there a really clean way to convert the time back using moment timezone? The moment docs don’t go into detail enough on the subject.
I’m planning for v4 and made a proposal for overhauling the date system. Can you all take a look? Please make relevant comments on this thread.
Wiki: Date System Revamp