View Single Post
07-27-12, 11:41 AM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
I use the following to modify the time format and have not had any problems as far as I remember.
Code:
local function lSetTimeText(button, timeLeft)
	local d, h, m, s = ChatFrame_TimeBreakDown(timeLeft)
	if timeLeft <= 0 then
		button:SetText("")
	elseif timeLeft < 3600 then
		button:SetFormattedText("%02d:%02d", m, s)
	end
end

hooksecurefunc("AuraButton_UpdateDuration", function(auraButton, timeLeft)
	if SHOW_BUFF_DURATIONS == "1" and timeLeft then
		local duration = auraButton.duration
		lSetTimeText(duration, timeLeft)
	end
end)
But I realise that that wasn't necessarily your point.
__________________
Grab your sword and fight the Horde!