Last active
September 1, 2016 18:14
-
-
Save pipedreambomb/d65ec95281e598f4012bf87ba9f4ed1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span id='date-me'></span> | |
<script type='text/JavaScript'>document.getElementById('date-me').innerHTML = new Date(Date.parse('Wed, 09 Aug 1995 00:00:00 GMT')).toLocaleString()</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update: I found Date.parse() does work with UTC as long as the string is formatted in one of a few supported ways.
I think outputting a DateTime as RoundTrip ought to do it.
https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Roundtrip
Might need to set the DateTimeKind first:
https://msdn.microsoft.com/en-us/library/system.datetime.specifykind(v=vs.110).aspx