Loading lib/Command/SyncMissingUsersToCommon.php +3 −2 Original line number Diff line number Diff line Loading @@ -195,13 +195,14 @@ class SyncMissingUsersToCommon extends Command { // Get user metadata from LDAP $userMetadata = $this->ldapConnectionService->getUserMetadata($username); // Convert LDAP createTimestamp to ISO 8601 (Y-m-d\TH:i:s\Z) // Convert LDAP createTimestamp to MySQL datetime format $ldapTimestamp = $userMetadata['createTimestamp'] ?? null; $createdAt = $ldapTimestamp; if ($ldapTimestamp) { $dateTime = \DateTime::createFromFormat('YmdHis\Z', $ldapTimestamp, new \DateTimeZone('UTC')); if ($dateTime !== false) { $createdAt = $dateTime->format('c'); // ISO 8601 $createdAt = $dateTime->format('Y-m-d H:i:s'); // Format compatible with MySQL } } Loading Loading
lib/Command/SyncMissingUsersToCommon.php +3 −2 Original line number Diff line number Diff line Loading @@ -195,13 +195,14 @@ class SyncMissingUsersToCommon extends Command { // Get user metadata from LDAP $userMetadata = $this->ldapConnectionService->getUserMetadata($username); // Convert LDAP createTimestamp to ISO 8601 (Y-m-d\TH:i:s\Z) // Convert LDAP createTimestamp to MySQL datetime format $ldapTimestamp = $userMetadata['createTimestamp'] ?? null; $createdAt = $ldapTimestamp; if ($ldapTimestamp) { $dateTime = \DateTime::createFromFormat('YmdHis\Z', $ldapTimestamp, new \DateTimeZone('UTC')); if ($dateTime !== false) { $createdAt = $dateTime->format('c'); // ISO 8601 $createdAt = $dateTime->format('Y-m-d H:i:s'); // Format compatible with MySQL } } Loading