...
there's a chance the wrong time will be displayed
I have no idea why or how this happens, but somehow the miniclock process starts living in its own time zone
someone please explain this to me
Code:
# date
Sun Oct 28 00:18:59 CEST 2018
^^^^^^^^^^^^^^^^^^^^
# strace -ff -p $(pidof miniclock.sh)
./strace: Process 765 attached
restart_syscall(<... resuming interrupted restart_syscall ...>) = 1
read(0, 0xa6d28, 1) = -1 EINVAL (Invalid argument)
dup2(11, 0) = 0
close(11) = 0
[...]
[pid 13229] stat64("/sbin/date", 0x7e98db70) = -1 ENOENT (No such file or directory)
[pid 13229] stat64("/usr/sbin/date", 0x7e98db70) = -1 ENOENT (No such file or directory)
[pid 13229] stat64("/bin/date", {st_mode=S_IFREG|0755, st_size=532224, ...}) = 0
[pid 13229] execve("/bin/date", ["date", "+%a %b %d %H:%m"], [/* 13 vars */]) = 0
[pid 13229] brk(NULL) = 0xa4000
[pid 13229] uname({sysname="Linux", nodename="(none)", ...}) = 0
[...]
[pid 13229] gettimeofday({tv_sec=1540678741, tv_usec=421127}, NULL) = 0
[pid 13229] brk(NULL) = 0xa4000
[pid 13229] brk(0xc5000) = 0xc5000
[pid 13229] open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
[pid 13229] fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
[pid 13229] fstat64(3, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
[pid 13229] fstat64(3, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
[pid 13229] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac4000
[pid 13229] read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10\0\0\0\0"..., 1024) = 1024
[pid 13229] _llseek(3, 1257, [2281], SEEK_CUR) = 0
[pid 13229] read(3, "\nCET-1CEST,M3.5.0,M10.5.0/3\n", 1024) = 28
[pid 13229] close(3) = 0
[pid 13229] munmap(0x2aac4000, 4096) = 0
[pid 13229] fstat64(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid 13229] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac4000
[pid 13229] write(1, "Sun Oct 28 00:10\n", 17) = 17
[pid 13229] exit_group(0) = ?
[pid 13229] +++ exited with 0 +++
<... read resumed> "Sun Oct 28 00:10\n", 128) = 17
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
[pid 13230] execve("/usr/local/MiniClock/fbink", ["fbink", "-X", "2000", "-Y", "2000", "-F", "IBM", "-S", "0", "-C", "BLACK", "-B", "WHITE", "Sun Oct 28 00:10"], [/* 13 vars */]) = 0
okay today is daylight saving clock change day, that might cause weird things, but... doesn't make a lick of sense to me right now. it's stuck on 00:10 forever now, but shell on the same device displays time correct
edit: issue persists after reboot and even poweroff, so I'll put this down to moon radiation then
edit: it's because I had %m instead of %M in the format string

silly me