Commit e0d3046f authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

1. fixed a minor bug 2.suppress php date() warning 3. correct date format for linux date

parent eba59843
...@@ -345,12 +345,12 @@ function decodeGet ($encoded_get) { ...@@ -345,12 +345,12 @@ function decodeGet ($encoded_get) {
case "_time": case "_time":
$toRead["req_ts"]=$value; /// Request time stamp, as received. Will be used by sender $toRead["req_ts"]=$value; /// Request time stamp, as received. Will be used by sender
$a=((float) $value)/1000; $a=((float) $value)/1000;
if (abs(elphel_get_fpga_time()-$a) > 24*3600) break; // time already set if (abs(elphel_get_fpga_time()-$a) < 24*3600) break; // time already set
case "_stime": case "_stime":
$toRead["req_ts"]=$value; $toRead["req_ts"]=$value;
$a=((float) $value)/1000; $a=((float) $value)/1000;
elphel_set_fpga_time ($a); // set FPGA time elphel_set_fpga_time ($a); // set FPGA time
exec("date -s ".date("mdHiY.s",(int)$a),$out,$ret); // set system time exec("date -s ".@date("Y-m-d H:i:s.u",(int)$a),$out,$ret); // set system time
exec("hwclock --systohc"); exec("hwclock --systohc");
break; break;
case "imgsrv": case "imgsrv":
......
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