Created
May 22, 2017 10:32
-
-
Save nordinrahman/fe5a5c77540399ccdf21666876c6e185 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| namespace Rextester | |
| { | |
| public class Program | |
| { | |
| private const int MB = 1024*1024; | |
| public static void Main(string[] args) | |
| { | |
| long mask = 0L; | |
| for(var i=0; i<32; i++) mask = (mask << 1) | 1L; | |
| var result = -1L ^ mask; | |
| result = ~~result; | |
| Console.WriteLine(result.ToString("X")); | |
| Console.WriteLine(DateTime.Parse("2017-05-19T18:28:28.7168282-05:00").ToUniversalTime()); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment