moonpyk / ncuid

Collision-resistant ids for .NET (port of https://github.com/dilvie/cuid)
MIT License
36 stars 13 forks source link

Use Utc for timestamp as timezone info is lost in the conversion to Unix milliseconds #7

Open MVHL opened 1 year ago

MVHL commented 1 year ago

var ts = DateTime.Now.ToUnixMilliTime().ToBase36(); It should use DateTime.UtcNow here as the Epoch time used is also Utc.