Simpler version of previous commit.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sat, 28 Apr 2012 20:38:08 +0000 (22:38 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sat, 28 Apr 2012 20:39:03 +0000 (22:39 +0200)
Use gmdate instead of DateTime + DateTimeZone.

modules/payment/money/bplccyberplus.inc.php

index 07e3ec5..344712f 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 = new DateTime('now', new DateTimeZone('UTC'));
-        $trans_date = $ts->format("YmdHis");
-        $trans_id = $ts->format("His"); // FIXME : check for duplicates
+        $ts = time();
+        $trans_date = gmdate("YmdHis", $ts);
+        $trans_id = gmdate("His", $ts); // FIXME : check for duplicates
 
         // Form's content.
         $this->urlform = "https://systempay.cyberpluspaiement.com/vads-payment/";