public static DateTime ParseShortTimeStamp(string stamp) { BigInteger bigInt = StringEncoder.FromString(stamp, StringEncoder.BASE36CHARS); double dbl = (double)bigInt; return(_shortStampBeginning.AddSeconds(dbl)); }
public static string GetShortTimeStamp() { var now = DateTime.Now; if (now < _shortStampBeginning) { throw new ArgumentException("The current date must not be before 2016."); } var d = now.Subtract(_shortStampBeginning); var i = new BigInteger(d.TotalSeconds); return(StringEncoder.ToString(i, StringEncoder.BASE36CHARS)); }