How can I convert a date value serialized in JSON to Moment?
E.g. a date is serialized as "Date":"\/Date(1488228437000+0100)\/" by a webservice I make my requests.
Thanks in advance!
I don't need to do anything with time zones, +/-/Z and the numbers following.
Are you sure? Normally, when a time is represented as a value and a zone offset, the value is local time and the zone offset is used to convert the local time back to UTC time.
The Moment class initializer expects the parameter to be the number of seconds since the epoch. To get a UTC time to pass to the Moment, you need to apply the offset. Once you have a properly constructed Moment and you use Gregorian.info() on it, it will be converted back to local time for display.
Travis