Skip to content

Commit d5fa1f2

Browse files
committed
time layout for watch backup name shall respect TZ environment variable, fix #1184
Signed-off-by: Slach <[email protected]>
1 parent 41d8578 commit d5fa1f2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v2.6.28
2+
BUG FIXES
3+
- time layout for watch backup name shall respect TZ environment variable, fix [1184](https://github.com/Altinity/clickhouse-backup/issues/1184)
4+
15
# v2.6.27
26
IMPROVEMENTS
37
- add config option `configuration_backup_always` (default false), fix [1180](https://github.com/Altinity/clickhouse-backup/issues/1180)

pkg/backup/watch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (b *Backuper) NewBackupWatchName(ctx context.Context, backupType string) (s
2525
for _, group := range watchBackupTemplateTimeRE.FindAllStringSubmatch(backupName, -1) {
2626
templateItem := group[0]
2727
layout := group[1]
28-
backupName = strings.ReplaceAll(backupName, templateItem, time.Now().UTC().Format(layout))
28+
backupName = strings.ReplaceAll(backupName, templateItem, time.Now().Format(layout))
2929
}
3030
} else {
3131
return "", fmt.Errorf("watch_backup_name_template doesn't contain {time:layout}, backup name will non unique")

0 commit comments

Comments
 (0)