First of all thank you for this wonderful addon. I would like to help with the issue.
I can reproduce the "truncation" issue (for me it looks like in the screenshot by Row ":MM PM", in Minimalist UI it is), no luck with odd positioning though. Please let me know if there is any additional information I can provide. I'll try to explain the issue as I see it to verify whether it is the same one you are getting reports for.
It only happens for 12 hour clock, both 24 hour versions of the clock work as expected.
In Game Options -> UI -> Wall clock format selection window there are following choices:
No clock
:34 PM
19:34
19:34:55
In the actual game the format corresponds to options in the format selection window.
Example 20:03:41 (option -> clock time):
No clock -> no time displayed
:34 PM -> :03 PM
19:34 -> 20:03
19:34:55 -> 20:03:41
Changing %l (lower case L) to %I (upper case i) in file load.lua seems to return hours
to both format selection window and in game clock. A quick search inside the addon
folder revealed only 3 matches for %l (one in L23, two in L72):
Code: Select all
..\tome-wall_clock_4\hooks\load.lua
Line 23: config.settings.tome.wall_clock_format = '%l:%M %p'
Line 72: { name=os.date('%l:%M %p', tz), fmt='%l:%M %p' },
After changing %l to %I:
Code: Select all
Wall Clock Debug Info
Minimalist UI, 1600x900
Clock at 319.20, scale 1
Time 07:04PM (from %I:%M %p), width 62
x = 319 + 120/2 - 62/2 = 348
y = 20 + 20/2 - 18/2 = 21
No change:
Code: Select all
Wall Clock Debug Info
Minimalist UI, 1600x900
Clock at 319.20, scale 1
Time :05PM (from %l:%M %p), width 40
x = 319 + 120/2 - 40/2 = 359
y = 20 + 20/2 - 18/2 = 21
ToME 1.5.10 for WIN from ToME site, Wall clock addon v1b2 (2018-07-25) from
https://te4.org/games/addons/tome/wall_clock
Edit. Totally forgot. Source: Programming in Lua (first edition), Part III. The Standard Libraries, 22.1 – Date and Time. A table with tags near the end of the page.
It is available online in Lua documentation
https://www.lua.org/docs.html
At first I thought I can find tags in Reference Manual. Apparently I was wrong.