Text.init(date, style: .timer) is 1 second out when it counts back up

Let's say you have a Text.init(Date().advanced(by: 5), style: .timer). It's set to countdown to a date 5 seconds from now (just for simplicity's sake).

It goes like this:

  • Countdown starts, and shows 0:05.
  • After 1 second it shows 0:04.
  • After 2 seconds it shows 0:03.
  • After 3 seconds it shows 0:02.
  • After 4 seconds it shows 0:01.
  • After 5 seconds it shows 0:00. Countdown done.

After 6 seconds it should show 0:01, right? It doesn't; it shows 0:00.

  • After 7 seconds it shows 0:01, even though only 6 seconds have passed.

It's almost as though the timer is being restarted once it hits zero, but that isn't right. There aren't "two seconds at 0:00" (that's not how time works...).

Anyone seeing this, or is just me?

Text.init(date, style: .timer) is 1 second out when it counts back up
 
 
Q