Output time in UTC format when sending payment requests to CyberPlusPayment. Also...
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sat, 28 Apr 2012 20:19:07 +0000 (22:19 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sat, 28 Apr 2012 20:19:07 +0000 (22:19 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
modules/payment/money/bplccyberplus.inc.php

index 6f3c4e1..07e3ec5 100644 (file)
@@ -68,9 +68,9 @@ class BPLCCyberPlus
         // Transaction's reference computation.
         $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id();
         $fullref = substr("$prefix-{$pay->id}",-12); // FIXME : check for duplicates
-        $ts = time();
-        $trans_date = date("YmdHis", $ts);
-        $trans_id = date("His", $ts); // FIXME : check for duplicates
+        $ts = new DateTime('now', new DateTimeZone('UTC'));
+        $trans_date = $ts->format("YmdHis");
+        $trans_id = $ts->format("His"); // FIXME : check for duplicates
 
         // Form's content.
         $this->urlform = "https://systempay.cyberpluspaiement.com/vads-payment/";