Hello All -
I've been having some problems with the correct javascript date display from a php calendar application I've written.
This application simply takes the timestamp for the current date (at 12:01pm) and generates a calendar for the next 12 months. When a user clicks on one of the dates, the timestamp for the date clicked is retrieved and other stuff happens.
The good news is that the javascript display issue has been solved through a work around. However, further testing regarding which timezone to implement for this application has me baffled. If you're creating an application that is dependent upon an accurate unix timestamp for any given date - which could be displayed from any timezone in the world - what is the correct timezone setting to use?
For example, in my application I'm using my local time zone setting - ini_set('date.timezone','Asia/Manila'). When I run a test for April 15, 2012 12:01pm I get a timestamp of 1334462460. If I then change the time zone setting to ini_set('date.timezone','America/New_York'), I get a timestamp of 1334505660.
Oh no!
I *thought* that a timestamp for a particular date would be the same no matter where in the world a user was, but apparently this is really determined by the timezone ini setting. Correct?
So, after all of that, my real question is: what is the "safest" timezone to implement for calendar application which could be potentially accessed from any timezone? ini_set('date.timezone','Europe/London')... which would be UTC 0?
If further clarification is needed, please do ask.
Thanks to all in advance!