Language
C#
Compiler
.NET Core 2.1.401
Options
$ dotnet build
Format specified in OP: {(int)ts.TotalHours}h {ts:mm}}mn {ts:ss}sec
348398h 29mn 28sec
105h 56mn 47sec
0h 02mn 03sec
3h 05mn 00sec
50h 00mn 30sec
Format with leading spaces: {(int)ts.TotalHours,6}h {ts:mm}mn {ts:ss}sec
TimeSpan.FromSeconds(1254234568) : 348398h 29mn 28sec
new TimeSpan(105, 56, 47) : 105h 56mn 47sec
new TimeSpan(0, 2, 3) : 0h 02mn 03sec
new TimeSpan(2, 65, 0) : 3h 05mn 00sec
new TimeSpan(50, 0, 30) : 50h 00mn 30sec
Exit Code:
0