Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use proper timezone in the timestamp received from barman-cloud-backup-list #97

Closed
Prev Previous commit
Next Next commit
Update test to cover timezone changes
Signed-off-by: Igor Shishkin <[email protected]>
teran authored and litaocdl committed Aug 27, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit d506778b218a3d7bead602c61a4e54f85e853368
4 changes: 4 additions & 0 deletions pkg/management/catalog/catalog_test.go
Original file line number Diff line number Diff line change
@@ -245,5 +245,9 @@ var _ = Describe("barman-cloud-backup-show parsing", func() {
Expect(result.SystemID).To(Equal("6885668674852188181"))
Expect(result.BeginTimeString).To(Equal("Tue Jan 19 03:14:08 2038"))
Expect(result.EndTimeString).To(Equal("Tue Jan 19 04:14:08 2038"))

// Test timezone set in the parsed time is equal to local one
Expect(result.BeginTime.Location()).To(Equal(time.Now().Location()))
Expect(result.EndTime.Location()).To(Equal(time.Now().Location()))
})
})