Skip to content

Commit

Permalink
Added option to force 24-hour clock (close #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Feb 8, 2021
1 parent b69b074 commit 0fa5f4e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Locale/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ L["Current session"] = true

L["Hide minimap button"] = true
L["Display server names"] = true
L["Force 24-hour time format"] = true
L["Display 24-hour timestamps even if US realm is detected."] = true
L["LDB feed display mode"] = true
L["Rating display always compares the values with the previous week."] = true
L["Show player server name in match detail tooltip."] = true
Expand Down
2 changes: 1 addition & 1 deletion REFlexFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ end

function RE:DateClean(timeRaw)
-- Barbarian friendly
if RE.PlayerZone == "US" then
if RE.PlayerZone == "US" and not RE.Settings.ForceCivilisedClock then
return date("%I:%M %p %m/%d/%y", timeRaw + (RE.PlayerTimezone * 3600))
else
return date("%H:%M %d.%m.%y", timeRaw + (RE.PlayerTimezone * 3600))
Expand Down
18 changes: 14 additions & 4 deletions REFlexStructures.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RE.DefaultConfig = {
["LDBMode"] = 3,
["LDBSide"] = "A",
["ArenaStatsLimit"] = 3,
["ForceCivilisedClock"] = false,
["ConfigVersion"] = RE.Version
}

Expand Down Expand Up @@ -209,12 +210,21 @@ RE.AceConfig = {
set = function(_, val) RE.Settings.ShowServerName = val end,
get = function(_) return RE.Settings.ShowServerName end
},
civilisedclock = {
name = L["Force 24-hour time format"],
desc = L["Display 24-hour timestamps even if US realm is detected."],
type = "toggle",
width = "full",
order = 3,
set = function(_, val) RE.Settings.ForceCivilisedClock = val end,
get = function(_) return RE.Settings.ForceCivilisedClock end
},
arenalimit = {
name = L["Arena composition statistics limit"],
desc = L["A minimal number of matches required to be included in arena team composition statistics."],
type = "range",
width = "double",
order = 3,
order = 4,
min = 1,
max = 10,
step = 1,
Expand All @@ -226,7 +236,7 @@ RE.AceConfig = {
desc = L["Rating display always compares the values with the previous week."],
type = "select",
width = "double",
order = 4,
order = 5,
values = {
[1] = L["Current session"],
[2] = _G.HONOR_TODAY,
Expand All @@ -241,7 +251,7 @@ RE.AceConfig = {
type = "execute",
width = "double",
confirm = true,
order = 5,
order = 6,
func = function() _G.REFlexDatabase = {}; _G.REFlexHonorDatabase = {}; ReloadUI() end
},
deleteoldseason = {
Expand All @@ -250,7 +260,7 @@ RE.AceConfig = {
type = "execute",
width = "double",
confirm = true,
order = 6,
order = 7,
func = function() RE:SeasonPurge(); ReloadUI() end
}
}
Expand Down

0 comments on commit 0fa5f4e

Please sign in to comment.