GetSpellCooldown returns the timestamp of when you first cast it and its duration. All you need to do is subtract the current time from that to get how much time is left.
Here's a complete example.
Lua Code:
local text = UIParent:CreateFontString(nil, nil, 'GameFontNormal')
text:SetPoint('CENTER')
CreateFrame('frame'):SetScript('OnUpdate', function()
local start, duration = GetSpellCooldown('conflagrate')
if duration > 2 then
local timeLeft = start + duration - GetTime() -- time until it recharges the first charge, in seconds
text:SetFormattedText('%d seconds until conflagrate', timeLeft)
else
text:SetText('Conflagrate not on cooldown')
end
end)