Reputation: 914
i am running into an issue - wondering what can be done to overcome. events are coming dynamically from a database. server is in the US - so thats GMT-4 hrs.
but i am in timezone GMT+2
so now (at 3:30am) - fullcalendar shows me thats its Monday (my local time that fullcalendar sees), but the events are coming in by the server time - which is Sunday.
so if i understand correctly - the events might be a day off in some cases.
what can be done to overcome this?
Thanks!!
Upvotes: 0
Views: 4805
Reputation: 5631
I think this depends on how you are setting dates in your calendar. If the dates are relative to the client's (client browser) date, then you will need to adjust the dates coming back from the server to the user's locale. Check this post - it has some good examples of how you can determine the user's timezone offset and correct your dates - How to get user timezone using jquery?
Hope this helps!
Upvotes: 1