Commit 736493bb authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #648 in ZP/z-push from...

Merge pull request #648 in ZP/z-push from bugfix/ZP-1354-basedate-in-globalobjectid-must-be-gmt to develop

* commit 'ce091a01':
  ZP-1354 Basedate in GlobalObjectId must be GMT.
parents 53c5c517 ce091a01
...@@ -2288,9 +2288,9 @@ If it is the first time this attendee has proposed a new date/time, increment th ...@@ -2288,9 +2288,9 @@ If it is the first time this attendee has proposed a new date/time, increment th
function setBasedateInGlobalID($goid, $basedate = false) function setBasedateInGlobalID($goid, $basedate = false)
{ {
$hexguid = bin2hex($goid); $hexguid = bin2hex($goid);
$year = $basedate ? sprintf('%04s', dechex(date('Y', $basedate))) : '0000'; $year = $basedate ? sprintf('%04s', dechex(gmdate('Y', $basedate))) : '0000';
$month = $basedate ? sprintf('%02s', dechex(date('m', $basedate))) : '00'; $month = $basedate ? sprintf('%02s', dechex(gmdate('m', $basedate))) : '00';
$day = $basedate ? sprintf('%02s', dechex(date('d', $basedate))) : '00'; $day = $basedate ? sprintf('%02s', dechex(gmdate('d', $basedate))) : '00';
return hex2bin(strtoupper(substr($hexguid, 0, 32) . $year . $month . $day . substr($hexguid, 40))); return hex2bin(strtoupper(substr($hexguid, 0, 32) . $year . $month . $day . substr($hexguid, 40)));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment