Skip to content

Instantly share code, notes, and snippets.

@LiQiuDGG
Last active December 25, 2025 20:41
Show Gist options
  • Select an option

  • Save LiQiuDGG/e44b5010f777577a1a166168841fd9f2 to your computer and use it in GitHub Desktop.

Select an option

Save LiQiuDGG/e44b5010f777577a1a166168841fd9f2 to your computer and use it in GitHub Desktop.
QuaziiUI - Time Datatext Wrong Time Fix

QuaziiUI - Time Datatext Fix

Fixes the time datatext showing wrong time when "Local Time" is selected.


Issue

Time datatext shows server time (2 hours off) even when "Local Time" is selected in options.


Root Cause

Settings mismatch between UI and datatext:

  • Options dropdown sets: timeFormat = "local" or "server" (string)
  • Time datatext checks: settings.useLocalTime (boolean)

When user changes the dropdown, only timeFormat is updated - the datatext never sees the change because it's checking a different key.


Implementation

1. Fix the Time Check

File: utils/qui_datatexts.lua (line 215)

Replace:

if settings.useLocalTime then
    hour, minute = tonumber(date("%H")), tonumber(date("%M"))
else
    hour, minute = GetGameTime()
end

With:

if settings.timeFormat == "local" then
    hour, minute = tonumber(date("%H")), tonumber(date("%M"))
else
    hour, minute = GetGameTime()
end

Summary

Aspect Implementation
Problem Checking useLocalTime (boolean) instead of timeFormat (string)
Solution Change condition to settings.timeFormat == "local"
Target File utils/qui_datatexts.lua
Line 215

This matches how the minimap clock already does it (quicore_minimap.lua:515):

local useLocalTime = (clockConfig.timeFormat == "local")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment