Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Time resolution issue for Type 1 UUID's #1

Open
managedfusion opened this issue May 2, 2010 · 0 comments
Open

Time resolution issue for Type 1 UUID's #1

managedfusion opened this issue May 2, 2010 · 0 comments

Comments

@managedfusion
Copy link

I was looking at the following code:

http://github.com/tlaukkan/mono-uuid-generator/blob/master/UUIDTimer.cs#L184

The line that I highlighted will not give you a valid Time UUID, because the Environment.TickCount is the system uptime, not the elapsed time since the Gregorian Calendar started as defined in the Type 1 UUID specification.

http://msdn.microsoft.com/en-us/library/system.environment.tickcount.aspx

I think you want something more equivalent to what I did here:

http://github.com/managedfusion/fluentcassandra/blob/master/FluentCassandra/GuidGenerator.cs#L64

Hope this helps, I look forward to scrapping my GUID generator for yours in the future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants