Problem:
I attempted to set the correct timezone and locale, and in the process discovered that the ntputil.c client sets the time again whenever sbitx is started. This uses a hard coded offset for the time, which sets the time incorrectly, and ignores the locale set on the raspberry pi. The NTP server is also currently hard-coded as one provided by google, when it could (should) be set to a local one instead.
I actually think most of this file is unnecessary as there are library calls that could replace it. (See sys/timex.h included with most Linux distributions: https://www.man7.org/linux/man-pages/man3/ntp_gettime.3.html and https://www.man7.org/linux/man-pages/man3/ntp_adjtime.3.html may also be of interest.)
I would prefer that the correct system calls were used and the settings put in place by raspi-config were used as this is how most people will be setting the time on their raspberry pi.
If that is too hard, then perhaps as a workaround, use sbitx.conf file with customised settings, allowing the user to put things like their local NTP server there. It should also contain the timezone. Currently it is defaulting to some random place in the US, and this is unhelpful.
Problem:
I attempted to set the correct timezone and locale, and in the process discovered that the ntputil.c client sets the time again whenever sbitx is started. This uses a hard coded offset for the time, which sets the time incorrectly, and ignores the locale set on the raspberry pi. The NTP server is also currently hard-coded as one provided by google, when it could (should) be set to a local one instead.
I actually think most of this file is unnecessary as there are library calls that could replace it. (See sys/timex.h included with most Linux distributions: https://www.man7.org/linux/man-pages/man3/ntp_gettime.3.html and https://www.man7.org/linux/man-pages/man3/ntp_adjtime.3.html may also be of interest.)
I would prefer that the correct system calls were used and the settings put in place by raspi-config were used as this is how most people will be setting the time on their raspberry pi.
If that is too hard, then perhaps as a workaround, use sbitx.conf file with customised settings, allowing the user to put things like their local NTP server there. It should also contain the timezone. Currently it is defaulting to some random place in the US, and this is unhelpful.