Issue 2190: Wrong time and date rendering
Status:  Done
Owner: ----
Closed:  Jun 2014
Reported by santine...@altralogica.it, Jun 23, 2014
I'm experiencing a weird issue with fullcalendar. I have a setup that is like the one you can see there:
http://jsfiddle.net/D8x2H/

On jsfiddle I see the correct dates and times for the events that I set as source. The same happens on my dev box.
But when I deploy the same code to production, everything shifts by 2 hours, just like it was ignoring the difference in time zone. 

I tried setting the timezone option of fullcalendar to "local", false, "UTC", "CEST" but with no luck.

Both the production and my dev box have the same TZ:

imacvalerio:~ tanis$ date
Lun 23 Giu 2014 10:18:51 CEST

pi@raspberrypi ~ $ date
lun 23 giu 2014, 10.20.49, CEST

Has this ever happened to you? Any idea of what might be wrong?
Thanks!
Jun 23, 2014
Project Member #1 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Reproducing
Labels: Type-Bug
Jun 23, 2014
#2 santine...@altralogica.it
Adam, if it can be of any help, I can give you access to the box that is behaving in a weird way so that you can check it out there. Just let me know.
Jun 23, 2014
Project Member #3 adamrs...@gmail.com
I can't help you any further, because this is very dependent on your server setup, which is out of the scope of this project, but your backend language, whether it's PHP/Ruby/whatever, probably has a config file with different TZ values.

For example, for php, there is a php.ini, and you'd want to look at the date.timezone value
http://www.php.net//manual/en/datetime.configuration.php
Status: Done
Jun 24, 2014
#4 santine...@altralogica.it
Hi Adam, actually you pointed me in the right direction. 

The backend is Node JS, nothing fancy. I thought it would grab the timezone from the OS unless otherwise specified. But it happens that on OSX it correctly grabs the system's timezone, but on that version of Linux that I'm using on the Raspberry Pi, it doesn't.

I forced it to through a standard export TZ="Europe/Rome" and it works like a charm. Thanks for the pointer! :)