I am following the answer in https://askubuntu.com/a/162714/146591 to generate a custom locale on my system. Many of the fields that can be configured in a locale are input for the date utility (https://www.man7.org/linux/man-pages/man1/date.1.html).
I would like to change some of the output of time format. Concretely, I want to show the clock in base-12 notation, such that when 09:08 (base 10) is equivalent to 09:08 (base 12), 12:10 is equivalent to 10:A0 (base 12, if we use A and B for the values after 9).
I would like to configure my locale section LC_TIME as
LC_TIME
copy "nl_NL"
t_fmt "$(((date +%H) % 12))$(((date +%M) % 12))"
END LC_TIME
but then more complicated to achieve what I need. I can make a script available system wide that would output the correct format, but this script would still need to be called by the locale library. It should not be passed as input parameters to the date utility.
Is any of this possible?