Skip to content

Instantly share code, notes, and snippets.

@nordinrahman
Created May 22, 2017 10:32
Show Gist options
  • Select an option

  • Save nordinrahman/fe5a5c77540399ccdf21666876c6e185 to your computer and use it in GitHub Desktop.

Select an option

Save nordinrahman/fe5a5c77540399ccdf21666876c6e185 to your computer and use it in GitHub Desktop.
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