6.0 changed the return values of GetSpellInfo, which is what is screwing up your function.
In EventHorizon I added this override to let me use the old return values so that the addon could work for both MoP and WoD.
Code:
GetSpellInfo = function(...)
local name, rank, icon, castingTime, minRange, maxRange = _GetSpellInfo(...)
return name, rank, icon, nil, nil, nil, castingTime, minRange, maxRange
end
The fixed version of your macro should be:
Code:
function()
name, rank, icon, castTime, minRange, maxRange = GetSpellInfo("Chaos Bolt")
return string.format("%.2f", castTime/1000)
end