Permalink
Browse files

MDL-41975 repository_alfresco: Ensure Moodle sends GMT time to Alfresco

  • Loading branch information...
1 parent 951ba5e commit 0ca5c122aa23347406c1730bed43b816b3bdbe20 @mcwoods mcwoods committed with FMCorz Apr 16, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/alfresco/Service/WebService/AlfrescoWebService.php
@@ -79,8 +79,8 @@ public function __doRequest($request, $location, $action, $version, $one_way = 0
// Construct Timestamp Header
$timeStamp = $dom->createElementNS($this->wsUtilityNS, "Timestamp");
- $createdDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+24, date("i"), date("s"), date("m"), date("d"), date("Y")));
- $expiresDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+25, date("i"), date("s"), date("m"), date("d"), date("Y")));
+ $createdDate = gmdate("Y-m-d\TH:i:s\Z", gmmktime(gmdate("H"), gmdate("i"), gmdate("s"), gmdate("m"), gmdate("d"), gmdate("Y")));
+ $expiresDate = gmdate("Y-m-d\TH:i:s\Z", gmmktime(gmdate("H")+1, gmdate("i"), gmdate("s"), gmdate("m"), gmdate("d"), gmdate("Y")));
$created = new DOMElement("Created", $createdDate, $this->wsUtilityNS);
$expires = new DOMElement("Expires", $expiresDate, $this->wsUtilityNS);
$timeStamp->appendChild($created);

0 comments on commit 0ca5c12

Please sign in to comment.