Well it is a very complex problem. Every skill can have multiple "icons". Every icon can have a "count" (usually meaning the stacks, Buff_Icon_Count0) and a start (Buff_Icon_Start_Tick0) and a finish (Buff_Icon_End_Tick0) timestamp.
Most skills are using icon index 0 to store their buff data, but there are many (!) exceptions you have to hard-code in your code.
And there are very complex buffs, like Combination Strike, which has FOUR parallel internal icon data - each for a specific spirit generator...
Another example is the mantra of whatever for monk, which has two timers. Once for a very short shielding stuff and one for the skill buff itself.
TLDR: "remaining buff time" is not a simple value, but a 1:N relation and it's messed up like shit.
EDIT: also there are skills which has only one timer but the icon index is different for each Rune of the skill...
EDIT2: if you want specific hard coded skill remaining times, then here is a little help for diamond skin which is using icon index 0 for all of it's runes:
- Diamond skin skill is 0x1274F
- Buff_Icon_End_Tick0 attribute is 0x1F1
int SkillFinishTicks = GetAttribHelper(your_player_characters_acd_FormulaMapData, your_player_characters_acd_FormulaMapMask, 0x1F1, 0x1274F, 0);
double seconds_left = (SkillFinishTicks > CurrentTick) ? (SkillFinishTicks - CurrentTick) / 60.0d : 0;