UpdateCurrencyRate.php
authorEdward <edward@roojs.com>
Mon, 20 Oct 2014 08:25:34 +0000 (16:25 +0800)
committerEdward <edward@roojs.com>
Mon, 20 Oct 2014 08:25:34 +0000 (16:25 +0800)
UpdateCurrencyRate.php

index d6213e0..461d4b0 100644 (file)
@@ -60,15 +60,15 @@ class Pman_Core_UpdateCurrencyRate extends Pman
         
         foreach ($currency as $c){
             $params = array(
-                'lang' => 'en',
-                'result' => 1,
-                'date1' => $fromDate,
-                'date'=> $toDate,
-                'date_fmt' => 'us',
-                'exch' => $c,
-                'expr' => 'USD',
-                'margin_fixed' => 0,
-                'format'=> 'HTML'
+                'lang'          => 'en',
+                'result'        => 1,
+                'date1'         => $fromDate,
+                'date'          => $toDate,
+                'date_fmt'      => 'us',
+                'exch'          => $c,
+                'expr'          => 'USD',
+                'margin_fixed'  => 0,
+                'format'        => 'HTML'
             );
             
             $response = $this->curl($this->actionUrl, $params, 'POST');
@@ -97,9 +97,9 @@ class Pman_Core_UpdateCurrencyRate extends Pman
             }
             
             $curr->setForm(array(
-                'rate' => $rate,
-                'from' => 
-                
+                'rate'  => $rate,
+                'from'  => date('Y-m-d H:i:s', strtotime($fromDate),
+                'to'    => date('Y-m-d H:i:s', strtotime($toDate),
             ));
 
         }