0

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!!

kneidels
  • 956
  • 6
  • 29
  • 55

1 Answers1

1

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!

Community
  • 1
  • 1
ganeshk
  • 5,583
  • 3
  • 27
  • 31
  • interesting. so the schedule that is coming from the database - is absolute. but the events generated by the JS - are dependent on the browser - so they need to be offset. got it. any comment on which of the JS methods discussed there is best to get the timezone offset? Thanks! – kneidels Jul 16 '12 at 06:13