the uid generate includes the year

This commit is contained in:
Fernando Ontiveros
2025-04-27 22:17:04 +00:00
parent 01563fdede
commit 4d6378a34c

View File

@@ -2875,7 +2875,8 @@ class G
// Remove the prefix from the unique ID and ensure it's 29 characters long // Remove the prefix from the unique ID and ensure it's 29 characters long
$uniqueId = date('YmdH') . str_replace('.', '', $uniqueId); // Remove any dots $uniqueId = date('YmdH') . str_replace('.', '', $uniqueId); // Remove any dots
$uniqueId = substr($uniqueId, -29); // Trim to 29 characters $uniqueId = substr($uniqueId, -30); // Trim first 30 characters (to start with the year)
$uniqueId = substr($uniqueId, 0, 29); // Trim the first 29 characters
// Combine the prefix with the unique ID // Combine the prefix with the unique ID
return strtolower($prefix) . $uniqueId; // Convert prefix to uppercase return strtolower($prefix) . $uniqueId; // Convert prefix to uppercase