I am having a lot of trouble converting a timestamp from Rails into something I can use in my Javascript.
Specifically, I have an alert set up to show the time of an event happening, and it produces a string like this: 2016-02-18T23:07:00.000-08:00
. What's weird is that doesn't look like a UTC string to me (as this answer outlines), and I can't figure out what time format that is.
I have tried using this method:
var t = "2016-02-18T23:07:00.000-08:00"
var u = t.to_time
But that returns "undefined." Ideally, I'd like to convert this string in Javascript to seconds or milliseconds. Is that possible?