Quantcast
Download
(745 Kb)
Download
Updated: 12/06/21 07:32 PM
Pictures
File Info
Compatibility:
Deadlands (7.2.5)
Updated:12/06/21 07:32 PM
Created:02/20/20 09:11 PM
Monthly downloads:1,184
Total downloads:25,596
Favorites:101
MD5:
Categories:Graphic UI Mods, Info, Plug-in Bars, RolePlay, UI Media, Miscellaneous
7.2.5
Clock - Tamriel Standard Time  Popular! (More than 5000 hits)
Version: 2.2.6
by: Tyx, Phinix

Clock

Tamriel Standard Time
by @Tyx

Version 2.2


This is a completely rewritten version of Clock - Tamriel Standard Time. It will show you the time and date in Tamriel and in the real world together with the current moon phase in Tamriel, as a pretty and fully customizable interface.





I was recently in the mood to update my old Clock - Tamriel Standard Time addon, but I didn't like the code I wrote six years ago. (Such a long time feels much shorter) Especially the user interface hasn't aged very well. So while I tried to fix a few things, I decided to just rewrite it.
I've split the logic (calculation of time, date and moon phase) into a new Library: LibClockTSTthe UI part in this one.

I decided to upload it as a new addon, because it will break all old settings and is not yet tested by anyone except myself. (I wrote nice unit tests though )
The old Clock will stay as a legacy code, but will not get any further updates from me.


Custom Textures

I created new textures for moons and Clock which are released under GPL-3, as is this entire addon. You are free to use any of my code and textures for your own projects as long as you use the same license and it stays Open Source.





Various Styles

You can adjust the style of the clock completely. Not just chose from some predefined colours and fonts with their sizes, but you are able to chose any RGBA colour, out of 10 fonts with 6 different styles. The size of the moon and the clock is dynamically adjustable by scrolling with the mouse wheel.





Visual Helper

If you hover over the Clock or Moon object, a tooltip will apear giving you further information about the time, date and moon phase. Especially the moon tooltip is quite usful, as it shows you how many days (in Tamriel) and hours (in real time) it will take, until the moon is full again.




Fully Customizable

Clock uses the LibAddonMenu-2.0 to give you a lot of options to customize the Clock to your liking.
For instance, you are now able to just write whatever you want in the Clock label with special variables which will be automatically replaced with their respective value.







Manage Settings In Presets
Change the look and feel to one of the default presets or create your own, to quickly change between various settings.





Modable

I tried to create Clock 2.0 in a way to make it easily possible to create patches and addons for it. For instance, if you want to create your own background texture, you only need Paint.net, create an image with transparent background, save in your patch/mod addon somewhere as an dds image with Linear DX5 format.
Finally, you have to overload the function:
Code:
Clock_TST.CONSTANTS
Don't worry, it is quite simple:

Lua Code:
  1. local const = Clock_TST.CONSTANTS()
  2. table.insert(const.Menu.time.BACKGROUND, "MyTextureName")
  3.  
  4. local myData = {
  5.   path = "PathToMyFileFolder",
  6.   background = "nameOfMyFile.dds",
  7.   hover = "nameOfMyHoverFile.dds" -- optional
  8. }
  9. const.UI.BACKGROUND["MyTextureName"] = myData
  10.  
  11. Clock_TST.CONSTANTS = function() return const end

Did not test it though




--------------------
---- 2.2.6 ---- ~Phinix
- Modified LibClockTST.GetWeekDay function to derive day-of-week value using unix epoch timestamps as the previous method was off by 1 for December 2021 and probably other dates.
- Updated API version for Deadlands.
--------------------
---- 2.2.5 ---- ~Phinix
- Fixed double number formatting bug with days.
--------------------
---- 2.2.4 ---- ~Phinix
- Updated API for Waking Flame update.
--------------------
---- 2.2.3 ---- ~Phinix
- Fixed double zero padding display when using custom text string for real time for the floating clock.
- Fixed fake lore mode not returning values for $H, $M, $S, $X, or $p.
- Cleaned up English translation for better descriptive wording, particularly for the custom time string construction feature for the floating clock under Look Options. Also gave a simple example use.
- Tested all symbol modes with text replacement manually, and verified all are returning proper values now.
- Bumped API to support current PTS as well as live (though PTS now automatically loads out of date addons anyway).
--------------------
---- 2.2.2 ---- ~Phinix
- Corrected hour padding not working properly for certain variables (lore hours).
- Corrected real date/time day wrongly showing as the lore equivalent in the popup display.
- Corrected 24 hour time not working as expected in all cases (0 hundred hours becoming 12 even when not set to 12 hour time, etc.).
- Changed behavior so removing all custom character strings from Look Filters would disable showing the floating time display, which was not intuitive as you had to manually toggle it back on to edit the field again.
- Some other minor changes and cleanup.
--------------------
---- 2.2.1 ---- ~Phinix
- Incorporated Phuein's time format fixes (esoui.com/downloads/info2895-Clock-TamrielStandardTimeQuickPatch.html).
- Added options for zero-padding individual time variables (hour, minute, second, day, and month) so you can customize the floating time display more specifically. Before if you chose zero padding (so minutes would read as 12:04 P.M. for example), it would also zero pad all the other values. So, the date would read as 04th instead of 4th, hours would read as 08:14 A.M. instead of 8:14 A.M., and if you wanted to remove these zeroes by disabling zero padding it disabled it for minutes, so you would get things like 12:4 A.M.. Setting this option for individual types avoids these limitations.
- Added option for minimalist am/pm values in the floating time (doesn't effect the tooltip display). This causes for example, 4:12 A.M. to display as 4:12 am, for people who prefer a more minimal display.
- Added a new option to the text edit options for floating time display, %D, which will show the day with the phonetic suffixes "1st, 3rd, 4th," etc., while %d will just show the plain number (1, 3, 4), useful for doing things like 4-4-21.
--------------------
---- 2.2.0 ----
- Added Preset to setting menu
- Added Small preset
- Added Map preset
- Added HideInGroup toggle (thanks for the idea an function @Crunatus)
- Fixed bug where the map hides only after the first opening of the map if set ShowOnMap
- Replaced my own with ZO functions if possible
--------------------
---- 2.1.0 ----
- Added Bindings to togglle visibility time, moon and both
- Added slider to menu to scale the moon
- Added context menu button to moon and time to reset scaling
- Added possiblitiy to set a background colour and hover colour
- Optimized addon loading time
- Reorganized settings menu
- Changed background textures to white
- Changed waning textures to waxing (thanks for reporting @Azmodan)
- Fixed bug that moon background is still visible if moon is not (thanks for reporting @Circuitous)
- Fixed bug of time and moon where they were still interactable even if not visible
- Removed unnecessary text outputs (thanks for reporting @Varana)
--------------------
---- 2.0.1 ----
- Fixed the regional bug, where the real date could not be calculated (thankgs for reporting @Azmodan)
--------------------
---- 2.0.0 ----
- Completely new code base of the interface
- Added custom textures
- Added customizable time and date label
- Added customizable moon
- Added context menu
- Added tooltip
- Added settings menu
- Added fragment controls
- Added dependencies for LibAddonMenu-2.0, LibClockTST, LibFeedback
--------------------
Optional Files (1)
File Name
Version
Size
Author
Date
Type
2.2.1
737kB
01/09/21 04:48 AM
Patch


Archived Files (8)
File Name
Version
Size
Uploader
Date
2.2.5
745kB
Phinix
09/10/21 02:56 PM
2.2.4
745kB
Phinix
08/23/21 08:13 AM
2.2.3
745kB
Phinix
04/30/21 04:57 PM
2.2.1
745kB
Phinix
04/18/21 10:42 AM
2.2.0
745kB
Tyx
03/06/20 04:37 PM
2.1.0
740kB
Tyx
02/24/20 04:41 PM
2.0.1
1MB
Tyx
02/21/20 11:01 AM
2.0.0
1MB
Tyx
02/20/20 09:11 PM


Post A Reply Comment Options
Unread 01/06/22, 03:39 PM  
sharkq

Forum posts: 0
File comments: 3
Uploads: 0
Hi

I have a question regarding the moon's tooltip.
When I launch the client in English it looks like that https://cdn.discordapp.com/attachmen...72/unknown.png

and when I launch the client in Russian it looks a bit different
https://cdn.discordapp.com/attachmen...53/unknown.png

I also remember that for the full moon phase the time/day value always shows 0 for the RU client and I'm curious, is it an addon problem or something on my side? (I tested it without any other addons)
Last edited by sharkq : 01/06/22 at 03:48 PM.
Report comment to moderator  
Reply With Quote
Unread 12/12/21, 12:20 PM  
Neverlands
 
Neverlands's Avatar

Forum posts: 6
File comments: 293
Uploads: 0
Re: Re: Errors

Originally Posted by Phinix
Update LibClockTST one more time and it should be fixed.

Problem was os.date() return value is a string and I wasn't doing tonumber() before a numerical evaluation, only on the return, so it wasn't changing the 0 to a 7 for Sunday like it should since this part of the code:
Lua Code:
  1. (dayNumber == 0) and 7 or dayNumber
...was not evaluated true and so returned an invalid index for Sunday.

Sorry for the hassle.
Also working with german language again. Thank you!
Report comment to moderator  
Reply With Quote
Unread 12/12/21, 09:10 AM  
Azmodan

Forum posts: 0
File comments: 33
Uploads: 0
Re: Re: Errors

Originally Posted by Phinix
Update LibClockTST one more time and it should be fixed.
It works now. Thx.
Report comment to moderator  
Reply With Quote
Unread 12/12/21, 07:42 AM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 167
File comments: 1386
Uploads: 31
Re: Errors

Update LibClockTST one more time and it should be fixed.

Problem was os.date() return value is a string and I wasn't doing tonumber() before a numerical evaluation, only on the return, so it wasn't changing the 0 to a 7 for Sunday like it should since this part of the code:
Lua Code:
  1. (dayNumber == 0) and 7 or dayNumber
...was not evaluated true and so returned an invalid index for Sunday.

Sorry for the hassle.
Last edited by Phinix : 12/12/21 at 07:46 AM.
Report comment to moderator  
Reply With Quote
Unread 12/12/21, 03:20 AM  
HowellQagan
 
HowellQagan's Avatar

Forum posts: 10
File comments: 379
Uploads: 0
Originally Posted by Phinix
When posting errors please include the text string you use for the date display from Settings -> Addons -> ClockTST -> Look Options. This will help narrow down the source along with the LUA errors themselves. Investigating...
Damn, it was in my mind to include it when I was looking at the errors but completely forgot when I was writing the comment here Sorry.

Still getting them even after the LibClockTST update today

Lua Code:
  1. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
  4. <Locals> self = [table:1]{sizeHasUpdated = T}, loreDate = [table:2]{month = 12, era = 2, year = 613, weekDay = 3, day = 21}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>
  5. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
  6. <Locals> self = [table:1], time = [table:3]{second = 6, hour = 14, minute = 24}, date = [table:2] </Locals>
  7. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
  8. <Locals> time = [table:3], date = [table:2] </Locals>
  9. user:/AddOns/LibClockTST/Lib/LibClockTST.lua:520: in function 'OnUpdate'
  10. <Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>

This is my timeformat string:
#A, #d #B #H:#M:#S
%A %H:%M:%S
__________________
Yep, I'm goddamn annoying.
Last edited by HowellQagan : 12/12/21 at 03:26 AM.
Report comment to moderator  
Reply With Quote
Unread 12/12/21, 03:07 AM  
polysoft
 
polysoft's Avatar

Forum posts: 0
File comments: 83
Uploads: 0
UI-Error:

user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
stack traceback:
user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
|caaaaaa<Locals> self = [table:1]{sizeHasUpdated = T}, loreDate = [table:2]{year = 613, era = 2, day = 21, weekDay = 3, month = 12}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>|r
user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
|caaaaaa<Locals> self = [table:1], time = [table:3]{hour = 12, minute = 46, second = 51}, date = [table:2] </Locals>|r
user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
|caaaaaa<Locals> time = [table:3], date = [table:2] </Locals>|r
user:/AddOns/LibClockTST/Lib/LibClockTST.lua:520: in function 'OnUpdate'
|caaaaaa<Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>|r


And then everything is blocked, cant access the settings and have to shut down the game via taskManager

and i also using german client
Last edited by polysoft : 12/12/21 at 03:07 AM.
Report comment to moderator  
Reply With Quote
Unread 12/12/21, 02:48 AM  
Neverlands
 
Neverlands's Avatar

Forum posts: 6
File comments: 293
Uploads: 0
Originally Posted by Neverlands
Hello,
from time to time I get this error (I'm using the German client):
Lua Code:
  1. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
  4. <Locals> self = [table:1]{sizeHasUpdated = F}, loreDate = [table:2]{year = 613, month = 12, era = 2, day = 19, weekDay = 1}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>
  5. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
  6. <Locals> self = [table:1], time = [table:3]{second = 51, hour = 19, minute = 30}, date = [table:2] </Locals>
  7. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
  8. <Locals> time = [table:3], date = [table:2] </Locals>
  9. user:/AddOns/LibClockTST/Lib/LibClockTST.lua:497: in function 'OnUpdate'
  10.  <Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>

Still an error:
Lua Code:
  1. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
  4. <Locals> self = [table:1]{sizeHasUpdated = T}, loreDate = [table:2]{year = 613, weekDay = 3, day = 21, month = 12, era = 2}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>
  5. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
  6. <Locals> self = [table:1], time = [table:3]{hour = 11, second = 4, minute = 11}, date = [table:2] </Locals>
  7. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
  8. <Locals> time = [table:3], date = [table:2] </Locals>
  9. user:/AddOns/LibClockTST/Lib/LibClockTST.lua:520: in function 'OnUpdate'
  10. <Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>


Here are my settings:





Last edited by Neverlands : 12/12/21 at 02:50 AM.
Report comment to moderator  
Reply With Quote
Unread 12/12/21, 01:34 AM  
Azmodan

Forum posts: 0
File comments: 33
Uploads: 0
Still error after test update


https://ibb.co/vsYZmj3
https://ibb.co/1fsPxCW

Fresh install without any option changed. SavedVariables was deleted
Last edited by Azmodan : 12/12/21 at 01:36 AM.
Report comment to moderator  
Reply With Quote
Unread 12/11/21, 11:32 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 167
File comments: 1386
Uploads: 31
When posting errors please include the text string you use for the date display from Settings -> Addons -> ClockTST -> Look Options. This will help narrow down the source along with the LUA errors themselves. Investigating...

EDIT: Uploaded test fix. Looks like I made a logic error in offsetting the os.time day return to LUA table (switching 0 to 7 to match) and was switching an additional day unnecessarily. Update LibClockTST (this main addon remains unchanged).
Last edited by Phinix : 12/11/21 at 11:51 PM.
Report comment to moderator  
Reply With Quote
Unread 12/11/21, 10:33 PM  
Azmodan

Forum posts: 0
File comments: 33
Uploads: 0
Count me too. have the same error today.
Rolled back to 225 with no luck. Have to disable addon
Last edited by Azmodan : 12/11/21 at 11:00 PM.
Report comment to moderator  
Reply With Quote
Unread 12/11/21, 06:14 PM  
Boostercc

Forum posts: 0
File comments: 8
Uploads: 0
Re: Uh oh

Originally Posted by HowellQagan
With the latest version as the time just passed 23:59:59, it started dropping a lua error on every second, for every clock update and the clock didn't progress past, something like this:

Lua Code:
  1. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
  4. <Locals> self = [table:1]{sizeHasUpdated = F}, loreDate = [table:2]{era = 2, day = 19, weekDay = 1, month = 12, year = 613}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>
  5. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
  6. <Locals> self = [table:1], time = [table:3]{hour = 19, second = 42, minute = 25}, date = [table:2] </Locals>
  7. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
  8. <Locals> time = [table:3], date = [table:2] </Locals>
  9. user:/AddOns/LibClockTST/Lib/LibClockTST.lua:497: in function 'OnUpdate'
  10. <Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>

It continued on after a reloadui too and failed to display the real world time completely.

Rolled back to previous, got this once but then it was fine with the second updates.

Lua Code:
  1. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
  4. <Locals> self = [table:1]{sizeHasUpdated = T}, loreDate = [table:2]{day = 19, era = 2, year = 613, month = 12, weekDay = 1}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>
  5. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
  6. <Locals> self = [table:1], time = [table:3]{hour = 19, minute = 41, second = 43}, date = [table:2] </Locals>
  7. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
  8. <Locals> time = [table:3], date = [table:2] </Locals>
  9. user:/AddOns/LibClockTST/Lib/LibClockTST.lua:497: in function 'OnUpdate'
  10. <Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>
Just Happened to me. I use the clock to keep an eye on the real world time so I dont have to keep switching between eso and desktop.

I hope it gets fixed.
Report comment to moderator  
Reply With Quote
Unread 12/11/21, 05:08 PM  
HowellQagan
 
HowellQagan's Avatar

Forum posts: 10
File comments: 379
Uploads: 0
Uh oh

With the latest version as the time just passed 23:59:59, it started dropping a lua error on every second, for every clock update and the clock didn't progress past, something like this:

Lua Code:
  1. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
  4. <Locals> self = [table:1]{sizeHasUpdated = F}, loreDate = [table:2]{era = 2, day = 19, weekDay = 1, month = 12, year = 613}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>
  5. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
  6. <Locals> self = [table:1], time = [table:3]{hour = 19, second = 42, minute = 25}, date = [table:2] </Locals>
  7. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
  8. <Locals> time = [table:3], date = [table:2] </Locals>
  9. user:/AddOns/LibClockTST/Lib/LibClockTST.lua:497: in function 'OnUpdate'
  10. <Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>

It continued on after a reloadui too and failed to display the real world time completely.

Rolled back to previous, got this once but then it was fine with the second updates.

Lua Code:
  1. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
  4. <Locals> self = [table:1]{sizeHasUpdated = T}, loreDate = [table:2]{day = 19, era = 2, year = 613, month = 12, weekDay = 1}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>
  5. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
  6. <Locals> self = [table:1], time = [table:3]{hour = 19, minute = 41, second = 43}, date = [table:2] </Locals>
  7. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
  8. <Locals> time = [table:3], date = [table:2] </Locals>
  9. user:/AddOns/LibClockTST/Lib/LibClockTST.lua:497: in function 'OnUpdate'
  10. <Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>
__________________
Yep, I'm goddamn annoying.
Report comment to moderator  
Reply With Quote
Unread 12/11/21, 05:04 PM  
Neverlands
 
Neverlands's Avatar

Forum posts: 6
File comments: 293
Uploads: 0
Hello,
from time to time I get this error (I'm using the German client):
Lua Code:
  1. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
  4. <Locals> self = [table:1]{sizeHasUpdated = F}, loreDate = [table:2]{year = 613, month = 12, era = 2, day = 19, weekDay = 1}, realDateString = 20211212, ry = 2021, rm = 12, rd = 12, rw = 0 </Locals>
  5. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
  6. <Locals> self = [table:1], time = [table:3]{second = 51, hour = 19, minute = 30}, date = [table:2] </Locals>
  7. user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
  8. <Locals> time = [table:3], date = [table:2] </Locals>
  9. user:/AddOns/LibClockTST/Lib/LibClockTST.lua:497: in function 'OnUpdate'
  10. <Locals> _ = "ClockTST", f = user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>
Last edited by Neverlands : 12/11/21 at 05:42 PM.
Report comment to moderator  
Reply With Quote
Unread 12/07/21, 07:55 AM  
Sylvermoon

Forum posts: 5
File comments: 26
Uploads: 0
Re: Wrong date fixed!

Originally Posted by Phinix
EDIT: OK, looks like the problem was the LibClockTST.GetWeekDay function returning the numerical day-of-week value offset by one for the month of December 2021 and probably others.

I modified the function to derive this value using unix epoch timestamps instead, accounting for the table index value offsets needed for the existing localization strings for the days of the week (although technically you could just get those using os.date('%A', epochTime) like the day number with %w, but this is easier for now).

Should be working now, although you will need to update LibClockTST as well.
Awesome, @Phinix! Thanks much for the quick fix!
Report comment to moderator  
Reply With Quote
Unread 12/06/21, 04:58 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 167
File comments: 1386
Uploads: 31
Wrong date fixed!

EDIT: OK, looks like the problem was the LibClockTST.GetWeekDay function returning the numerical day-of-week value offset by one for the month of December 2021 and probably others.

I modified the function to derive this value using unix epoch timestamps instead, accounting for the table index value offsets needed for the existing localization strings for the days of the week (although technically you could just get those using os.date('%A', epochTime) like the day number with %w, but this is easier for now).

Should be working now, although you will need to update LibClockTST as well.
Last edited by Phinix : 12/06/21 at 07:37 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.