Subversion Repositories uuid_mac_utils

Compare Revisions

Regard whitespace Rev 84 → Rev 85

/trunk/includes/uuid_utils.inc.php
840,7 → 840,7
if (strtolower($signature) == '5ce32bd83b96') {
// HickelSOFT "SQL Server sortable UUID in C#"
// Version 2: Resolution of 1 milliseconds, random part of 18 bits, UTC time, UUIDv8 conform.
// Example: 2088dc33-000d-8045-87e8-4849434b454c
// Example: 2088dc33-000d-8045-87e8-5ce32bd83b96
// Block 4
$rnd2bits = hexdec(substr($uuid,16,1)) & 0x3;
$year = hexdec(substr($uuid,17,3));
/trunk/index.php
244,7 → 244,7
 
<h3 id="gen_uuidv8_sqlserver">Generate SQL server sortable time-based (version 8) UUID</h3>
 
<p><i>The sorting of SQL Server is rather confusing and incompatible with UUIDv6 and UUIDv7.<br>
<p><i>The sorting of UUIDs in SQL Server is rather confusing and incompatible with UUIDv6 and UUIDv7.<br>
Therefore this method developed by <a href="https://www.hickelsoft.de/">HickelSOFT</a>
generates UUIDs which are sortable by SQL Server.<br>
They have a time resolution of 1 milliseconds combined with 18 bits of random data.</i><br>
271,7 → 271,7
- 12 bit UTC Year (hex encoded)
- 48 bit Signature 0x5ce32bd83b96
 
Version 1: Resolution of 1 milliseconds, random part of 16 bits, local timezone, 48 zero bit "signature", NOT UUIDv8 conform.
Version 1: Resolution of 1 milliseconds, random part of 16 bits, local timezone, 48 zero bit "signature", NOT UUIDv8 conform:
- 16 bit Random data
- 8 bit Generator's local timezone Milliseconds transformed from 1000ms to 0..255, deviation -4ms..0ms (hex encoded)
- 8 bit Generator's local timezone Seconds (BCD encoded)