My backend is currently supplying my frontend with the following information:
time: {
stamp: '2013-11-03T18:12:39',
timezone: 'PST'
}
I'm currently using Moment.js to convert the time into a more readable string: 11/03/2013 6:12 PM PST
However, this is not accurate as the original time is in GMT. How can I apply the timezone conversion using the string 'PST'?
Does anyone know of a library that can assist in doing so or will I be required to code a long switch that would look at the string and offset the time from there for all timezones applicable to the application?
Moment.js has a timezone conversion tool, however it uses location information not timezone short forms.