plirof2

DATE linux from PHP script (server)

Sep 15th, 2021
653
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. date -s '2019-10-17 12:00:00'
  2.  
  3.  
  4. Script from Server http://192.168.1.200/swf/gettime.php
  5. <?php
  6. //bash needs date -s '2019-10-17 12:00:00'
  7. //echo date("Y-m-d h:i:s"); //2021-09-15 01:26:28
  8. echo date("Y-m-d h:i:s");
  9. ?>
  10.  
  11. script run from client:
  12. # date -s '2019-10-17 12:00:00'
  13. RESULT="`wget -qO- http://192.168.1.200/swf/gettime.php`"
  14. echo $RESULT
  15. date -s $RESULT
RAW Paste Data