Skip to content

Instantly share code, notes, and snippets.

@chrisdickinson
Created August 13, 2011 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdickinson/1143496 to your computer and use it in GitHub Desktop.
Save chrisdickinson/1143496 to your computer and use it in GitHub Desktop.
what is this i don't even
> ''+(new Date(1000))
'Wed Dec 31 1969 18:00:01 GMT-0600 (CST)'
> ''+(new Date())
'Sat Aug 13 2011 00:13:14 GMT-0500 (CDT)'
@chrisdickinson
Copy link
Author

@tbranyen so, given '1313212826216 -0600', how do you convert that into UTC?

@chrisdickinson
Copy link
Author

this might be what I'm going for -- show the originating "local" time for a timestamp, along with the UTC offset.

(e.g., given 1310976115000 -0700 and I am UTC-0500 (CDT), I want to see 'Mon Jul 18 01:01:55 2011 -0700', not 'Mon Jul 18 2011 03:01:55 GMT-0500 (CDT)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment