pysalx/scripts/pysalx-date-set

27 lines
583 B
Plaintext
Raw Normal View History

#!/bin/bash
# Set date based on current system time.
# Perhaps you should make sure your local clock is correct. :)
# sudo ntpdate time.mit.edu
2022-05-06 12:35:20 -06:00
echo "Be the root"
adb root
echo "Current time on analyzer"
adb shell busybox date
echo
NOW=`date -u "+%Y-%m-%d %H:%M:%S"`
echo "Setting time to "
adb shell busybox date -s \"$NOW\"
echo
echo "Current time on analyzer"
adb shell busybox date
2022-05-25 13:28:58 -06:00
echo
echo "Write time to hardware clock"
adb shell hwclock -w -u
echo "Current hardware clock time"
adb shell hwclock -u
2022-05-25 13:41:11 -06:00
# Set the timezone, ala:
#setprop persist.sys.timezone "America/Denver"