Last active
October 12, 2015 19:26
-
-
Save slofurno/30b04b45281101e9c5a4 to your computer and use it in GitHub Desktop.
get ms since utc epoch, compatible with js Date
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
var GetUtcMs = ((Func<Func<DateTime, long>>)(() => | |
{ | |
var _utczero = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
return x => (long)((x.ToUniversalTime() - _utczero).TotalMilliseconds); | |
}))(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment