mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-16 21:14:19 +00:00
fix: modify generated from schedule's backup name timestamp to UTC ti… (#4353)
* fix: modify generated from schedule's backup name timestamp to UTC timezone fix #4279 When backup is created from schedule, and the backup name is not specified, a containing-timestamp generated name will be used. Due to velero client not set timezone to UTC, a local timezone will be used for the generated name. Signed-off-by: Xun Jiang <jxun@vmware.com> * fix: modify generated from schedule's backup name timestamp to UTC timezone fix #4279 When backup is created from schedule, and the backup name is not specified, a containing-timestamp generated name will be used. Due to velero client not set timezone to UTC, a local timezone will be used for the generated name. Signed-off-by: Xun Jiang <jxun@vmware.com> * fix: modify generated from schedule's backup name timestamp to UTC timezone fix #4279 When backup is created from schedule, and the backup name is not specified, a containing-timestamp generated name will be used. Due to velero client not set timezone to UTC, a local timezone will be used for the generated name. Signed-off-by: Xun Jiang <jxun@vmware.com> * modify changelog description Reword the changelog description according to comments. Signed-off-by: Xun Jiang <jxun@vmware.com> Co-authored-by: jxun <jxun@jxun-a01.vmware.com> Co-authored-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
co-authored by
jxun
Xun Jiang
parent
5150ce4891
commit
fc29294552
@@ -0,0 +1 @@
|
||||
Modify the timestamp in the name of a backup generated from schedule to use UTC.
|
||||
@@ -322,7 +322,7 @@ func (o *CreateOptions) BuildBackup(namespace string) (*velerov1api.Backup, erro
|
||||
return nil, err
|
||||
}
|
||||
if o.Name == "" {
|
||||
o.Name = schedule.TimestampedName(time.Now())
|
||||
o.Name = schedule.TimestampedName(time.Now().UTC())
|
||||
}
|
||||
backupBuilder = builder.ForBackup(namespace, o.Name).
|
||||
FromSchedule(schedule)
|
||||
|
||||
Reference in New Issue
Block a user