Hey lovely programmers,

Today I had a big frustration with an XML file I had to parse containing 25 hours for the 30/10/2016.

All these hours where as String, and no way to use TimeSpan with 25 hours otherwise its the next day…

The best way I found is to generate a list with all the hours of the day but as DateTimeOffset to have the shift of hour at 2 AM for that particular day. And even better, every hour will contain an Index…

If you need the Quarters instead of Hours, just replace the 60 by 15 at the two places…

Enjoy!