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

barman-cloud-backup-list and barman-cloud-backup-show return incorrect time if postgres is not in utc 0 #1009

Open
litaocdl opened this issue Aug 28, 2024 · 3 comments

Comments

@litaocdl
Copy link

litaocdl commented Aug 28, 2024

The xl.download show begin time in timezone +2

begin_time=2024-08-28 08:28:01.701883+02:00
end_time=2024-08-28 08:28:02.370511+02:00

barman-cloud-backup-list and barman-cloud-backup-show use ctime to convert the begin_time and
end_time to string format but ignore the timezone.

barman-cloud-backup-show --endpoint-url <http://minio-service.minio:9000>  --cloud-provider aws-s3 s3://cluster-backups/ cluster-locale  20240828T062801 --format json
{"cloud": { "begin_time": "Wed Aug 28 08:28:01 2024", ... "end_time": "Wed Aug 28 08:28:02 2024"}}

we do not know Wed Aug 28 08:28:01 2024 is from what timezone.

if barman can return the timezone they are using, or return the UTC time would solve the problem.

This from an escalation of a customer.

cc @martinmarques @gcalacoci

@gcalacoci
Copy link
Contributor

hi @litaocdl

the two values:

begin_time=2024-08-28 08:28:01.701883+02:00
end_time=2024-08-28 08:28:02.370511+02:00

containing the correct time zone, are coming from the backup.info file of the backup?

@litaocdl
Copy link
Author

@gcalacoci Yes, the are from backup.info and postgres is using timezone: Europe/Vienna

@litaocdl
Copy link
Author

if possible, for the hotfix, can we parse begin_time and end_time to time string in UTC 00 timezone. We assume this time is UTC +00 time in the json format in operator. In this case, when the operand upgrade, this issue can be fixed automatically with hotfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants