Created
June 12, 2022 23:14
-
-
Save rakslice/294512a7449e40b0c79595561968b538 to your computer and use it in GitHub Desktop.
A fragment for AIX PS/2 1.3's /etc/init.dir/B2s.i386 to set the system time from the hardware clock correctly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This section replaces date `cat /dev/clock` | |
# Combines the two suggestions from http://ohlandl.ipv7.net/AIX_1-3/AIX_Set_Date.html | |
TMPDATE=`cat /dev/clock` | |
date `echo "$TMPDATE"\ | |
| awk '{printf("12312000.00%s",substr($0,0,2));}'` | |
date `echo "$TMPDATE"\ | |
| awk '{printf("%s",substr($0,3,11));}'` | |
echo "$TMPDATE" > /dev/clock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment