I created a daemon-bash-script on a Debian, which copies an .img
to an external disk. The script copies the .img
with dd
to the external disk and afterward it mounts the disk to check the filesystem.
Is there a possibility to change the date and time in a file somewhere? My problem is that after the first boot (without an internet link) the year is in 2033.
I tried to change the timestamp in /etc/adjtime
. But after a reboot, it only set's back to 2033:
0.000000 2001162716 0.000000
2001162716
UTC
Thanks :)
EDIT 1
I just found out that my Alix has two different dates:
~# hwclock
Sat Jan 1 01:01:04 2000 -0.521995 seconds
~# date
Tue May 31 20:49:59 CEST 2033
How's that possible?
adjtime
is not used to set the time. Normally, at boot the kernel discovers the hardware rtc device, reads it and sets the system time to that value.cat /sys/class/rtc/rtc0/hctosys
should be 1 if it did this. Usehwclock
to read the rtc. Perhaps your board doesnt have an rtc, or no battery?