Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 20th, 2012  |  syntax: None  |  size: 0.20 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2. TIMEZONE=pst
  3. wget -q -O /root/time http://www.timeapi.org/$TIMEZONE/now?format=%25a%20%25b%20%25d%20%25I:%25M:%25S%20%25Z%20%25Y
  4. timeapi=`cat /root/time`
  5. echo $timeapi
  6. date -s "$timeapi"