[Bug] "Maxed at" timestamp is being shown incorrectly

Open Beginner friendly
#164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
91/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
lua
Domain
backend

Research direction

Search the addon for the expression using currencyInfo.lastUpdated + timeToMax and inspect how the concentration tooltip formats its “Maxed at” timestamp. The issue identifies the replacement clock call as GetServerTime(); verify the displayed date for cached offline character data against the current time plus the remaining duration.

Written by the indexing model from the issue text.

Description

Bug
Addon version

v1.4.3

Tested with only this addon enabled?

Yes

Describe what happened and what you expected to happen

The "Maxed at" timestamp in the concentration tooltip calculates the future completion date incorrectly when viewing cached data for an offline character. It anchors the remaining time (timeToMax) to the historical currencyInfo.lastUpdated timestamp instead of the current runtime clock, causing the predicted date to shift backward by the exact amount of time elapsed since the character was last saved.

tostring(date("%c", currencyInfo.lastUpdated + timeToMax))

should be

tostring(date("%c", GetServerTime() + timeToMax))
Steps to reproduce
  1. Log into a character with a profession, open the profession tab to sync currency data, and log out.
  2. Log onto a different character after several hours.
  3. Open the addon dashboard/tooltip to view the offline character's concentration status.
  4. Compare a manual addition of the displayed "Time to Max" duration to the current local time against the date printed next to "Maxed at:".
Lua error(s)
There are no errors.
Screenshots
Image Image Image

(All screenshots taken between 16:00 and 17:30)

Dominant language
Lua
Stars
15
Forks
15
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DennisRas/WeeklyKnowledge

All issues in DennisRas/WeeklyKnowledge

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.