Subversion Repositories uuid_mac_utils

Rev

Rev 84 | Rev 86 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 84 Rev 85
Line 242... Line 242...
242
    <input type="hidden" name="uuid" value="CREATE"> <input type="submit" value="Create and display another UUID">
242
    <input type="hidden" name="uuid" value="CREATE"> <input type="submit" value="Create and display another UUID">
243
</form>
243
</form>
244
 
244
 
245
<h3 id="gen_uuidv8_sqlserver">Generate SQL server sortable time-based (version 8) UUID</h3>
245
<h3 id="gen_uuidv8_sqlserver">Generate SQL server sortable time-based (version 8) UUID</h3>
246
 
246
 
247
<p><i>The sorting of SQL Server is rather confusing and incompatible with UUIDv6 and UUIDv7.<br>
247
<p><i>The sorting of UUIDs in SQL Server is rather confusing and incompatible with UUIDv6 and UUIDv7.<br>
248
Therefore this method developed by <a href="https://www.hickelsoft.de/">HickelSOFT</a>
248
Therefore this method developed by <a href="https://www.hickelsoft.de/">HickelSOFT</a>
249
generates UUIDs which are sortable by SQL Server.<br>
249
generates UUIDs which are sortable by SQL Server.<br>
250
They have a time resolution of 1 milliseconds combined with 18 bits of random data.</i><br>
250
They have a time resolution of 1 milliseconds combined with 18 bits of random data.</i><br>
251
<a href="https://gist.github.com/danielmarschall/7fafd270a3bc107d38e8449ce7420c25">C# implementation</a> |
251
<a href="https://gist.github.com/danielmarschall/7fafd270a3bc107d38e8449ce7420c25">C# implementation</a> |
252
<a href="https://github.com/danielmarschall/uuid_mac_utils/blob/master/includes/uuid_utils.inc.php">PHP implementation</a>
252
<a href="https://github.com/danielmarschall/uuid_mac_utils/blob/master/includes/uuid_utils.inc.php">PHP implementation</a>
Line 269... Line 269...
269
-  2 bit UUID Variant (0b10)
269
-  2 bit UUID Variant (0b10)
270
-  2 bit Random data
270
-  2 bit Random data
271
- 12 bit UTC Year (hex encoded)
271
- 12 bit UTC Year (hex encoded)
272
- 48 bit Signature 0x5ce32bd83b96
272
- 48 bit Signature 0x5ce32bd83b96
273
 
273
 
274
Version 1: Resolution of 1 milliseconds, random part of 16 bits, local timezone, 48 zero bit "signature", NOT UUIDv8 conform.
274
Version 1: Resolution of 1 milliseconds, random part of 16 bits, local timezone, 48 zero bit "signature", NOT UUIDv8 conform:
275
- 16 bit Random data
275
- 16 bit Random data
276
-  8 bit Generator's local timezone Milliseconds transformed from 1000ms to 0..255, deviation -4ms..0ms (hex encoded)
276
-  8 bit Generator's local timezone Milliseconds transformed from 1000ms to 0..255, deviation -4ms..0ms (hex encoded)
277
-  8 bit Generator's local timezone Seconds (BCD encoded)
277
-  8 bit Generator's local timezone Seconds (BCD encoded)
278
-  8 bit Generator's local timezone Minute (BCD encoded)
278
-  8 bit Generator's local timezone Minute (BCD encoded)
279
-  8 bit Generator's local timezone Hour (BCD encoded)
279
-  8 bit Generator's local timezone Hour (BCD encoded)