I am retrieving event information very cleverly using Facebook's graph API.
Alas it returns the date in the following format:
Now I have done the following to make it look more useful to the user, however I have noticed that the date is in fact wrong compared to how the event displays on facebook.
var eventDate = events.start_time; var temp = eventDate.split("T"); eventDate = temp.split("-"); eventDate = eventDate + "/" + eventDate + "/" + eventDate; var eventTime = temp.split("+"); var dateString = eventDate + " " + eventTime;
Is it possible to find out what timezone this was set to, and then deduct or add the local timezone difference to it? I am at a loss
date = new Date('2010-12-12T05:30:00+0000');
Then you can format the date object as you like.
As far as I know the +0000 specifies the GMT+xx.xx ( hh:mm ) zone.