Display local time for all commands
This commit is contained in:
parent
920727dd34
commit
c012fccd22
4 changed files with 4 additions and 4 deletions
|
@ -213,7 +213,7 @@ func (s *statefulOutput) PrintObjectNormal(kind, id, nodepath, treeID string, sn
|
||||||
} else {
|
} else {
|
||||||
Printf(" ... path %s\n", nodepath)
|
Printf(" ... path %s\n", nodepath)
|
||||||
}
|
}
|
||||||
Printf(" ... in snapshot %s (%s)\n", sn.ID().Str(), sn.Time.Format(TimeFormat))
|
Printf(" ... in snapshot %s (%s)\n", sn.ID().Str(), sn.Time.Local().Format(TimeFormat))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *statefulOutput) PrintObject(kind, id, nodepath, treeID string, sn *restic.Snapshot) {
|
func (s *statefulOutput) PrintObject(kind, id, nodepath, treeID string, sn *restic.Snapshot) {
|
||||||
|
|
|
@ -59,7 +59,7 @@ func listKeys(ctx context.Context, s *repository.Repository, gopts GlobalOptions
|
||||||
ID: id.Str(),
|
ID: id.Str(),
|
||||||
UserName: k.Username,
|
UserName: k.Username,
|
||||||
HostName: k.Hostname,
|
HostName: k.Hostname,
|
||||||
Created: k.Created.Format(TimeFormat),
|
Created: k.Created.Local().Format(TimeFormat),
|
||||||
}
|
}
|
||||||
|
|
||||||
keys = append(keys, key)
|
keys = append(keys, key)
|
||||||
|
|
|
@ -184,7 +184,7 @@ func PrintSnapshots(stdout io.Writer, list restic.Snapshots, reasons []restic.Ke
|
||||||
for _, sn := range list {
|
for _, sn := range list {
|
||||||
data := snapshot{
|
data := snapshot{
|
||||||
ID: sn.ID().Str(),
|
ID: sn.ID().Str(),
|
||||||
Timestamp: sn.Time.Format(TimeFormat),
|
Timestamp: sn.Time.Local().Format(TimeFormat),
|
||||||
Hostname: sn.Hostname,
|
Hostname: sn.Hostname,
|
||||||
Tags: sn.Tags,
|
Tags: sn.Tags,
|
||||||
Paths: sn.Paths,
|
Paths: sn.Paths,
|
||||||
|
|
|
@ -90,6 +90,6 @@ func formatNode(path string, n *restic.Node, long bool) string {
|
||||||
|
|
||||||
return fmt.Sprintf("%s %5d %5d %6d %s %s%s",
|
return fmt.Sprintf("%s %5d %5d %6d %s %s%s",
|
||||||
mode|n.Mode, n.UID, n.GID, n.Size,
|
mode|n.Mode, n.UID, n.GID, n.Size,
|
||||||
n.ModTime.Format(TimeFormat), path,
|
n.ModTime.Local().Format(TimeFormat), path,
|
||||||
target)
|
target)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue