Time Change Caused Backup To Repeat 150 Times

Please describe what you are doing to trigger the bug:

I have my backup set to run every day at 2 a.m. I’m in Central time zone and early this morning around 2 a.m the time changed. This caused my backup to repeat over 150 times if I counted every Discord notification correctly.

It also casued my New Revisions to shoot up 150 times and I’m pretty sure broke the Activies pane.

Please describe what you expect to happen (but doesn’t):

I expect the backup to run once lol

Please describe what actually happens (the wrong behaviour):

On time change, backup repeated 150 times.

Did those backup jobs start at 1am and end at 2pm?

My backup starts running at 2 a.m. I got the first notification at 1 a.m. It is a fairly small backup so I kept getting concurrent notifications until 2 a.m.

Small GIF of all the backups that ran. The last one is actually the message above the last message on that channel which was at 1:59 a.m.

This is caused by an unexpected behavior of the date creation function in Go:

package main

import (

func main() {
	now := time.Now()
	t1 := time.Date(2021, 3, 14, 1, 59, 59, 0, now.Location()) // 03/14/2021 1:59:59am
	t2 := time.Date(2021, 3, 14, 2, 0, 0, 0, now.Location()) // 03/14/0221 2:00:00am
	fmt.Printf("1:59:59am: %d\n", t1.Unix())
	fmt.Printf("2:00:00am: %d\n", t2.Unix())

Output on my machine:

1:59:59am: 1615705199
2:00:00am: 1615701600

As you can see the unix time goes backward at exactly 2am which explains why the backup job kept running during that 1-hour period.

I’ll fix this in the next release.

1 Like

Thank you for the response and finding the “bug”! I can’t stop saying what a good backup solution your software is