Is there a good way to format a Duration in something like hh:mm:ss, without having to deal with time zones?
I tried this:
DateTime durationDate = DateTime.fromMillisecondsSinceEpoch(0);
String duration = DateFormat('hh:mm:ss').format(durationDate);
But I always get 1 hour to much, in this case it would say 01:00:00
And When I do this:
Duration(milliseconds: 0).toString();
I get this: 0:00:00.000000
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…