question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

timezone handling

See original GitHub issue

Hi 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 and end 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:closed
  • Created 8 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
evanjmgcommented, Apr 20, 2017

+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.

1reaction
arshawcommented, Apr 24, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Handle Timezones and Synchronize Your Software ...
When you develop some software you may not think about timezones at first. Unless you live in a country which has to deal...
Read more >
3 simple rules for effectively handling dates and timezones
Rule #1 - STORE DATETIMES IN UTC IN YOUR DATABASE, AND BACK END CODE. It is important that there is consistency across all...
Read more >
The best way to handle time zones in a Java web application
To simplify the time zone handling process, it's best practice to store timestamps in UTC (Coordinated Universal Time) and convert the ...
Read more >
Handling timezone in Python - GeeksforGeeks
astimezone() method is used to manipulate i.e., to convert the datetime objects to the new specified datetime object. It uses an instance of...
Read more >
Working with Time Zones - W3C
6.5 Working with Date and Time Values that Require a Time Zone (and not a ... Correct handling of past time values requires...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found