2
2
mirror of https://github.com/octoleo/restic.git synced 2024-10-31 19:02:32 +00:00

Use local time for user-provided time of backup

This commit is contained in:
plumbeo 2018-11-20 18:01:36 +01:00
parent 4ab0022da8
commit a7971a3ece

View File

@ -377,7 +377,7 @@ func runBackup(opts BackupOptions, gopts GlobalOptions, term *termstatus.Termina
timeStamp := time.Now() timeStamp := time.Now()
if opts.TimeStamp != "" { if opts.TimeStamp != "" {
timeStamp, err = time.Parse(TimeFormat, opts.TimeStamp) timeStamp, err = time.ParseInLocation(TimeFormat, opts.TimeStamp, time.Local)
if err != nil { if err != nil {
return errors.Fatalf("error in time option: %v\n", err) return errors.Fatalf("error in time option: %v\n", err)
} }