From 1183a3e6e7ae7a89ec7a8d5e8cbbf059b0cb9667 Mon Sep 17 00:00:00 2001 From: devisions Date: Thu, 28 May 2020 14:56:07 +0300 Subject: [PATCH] Explicit Z on logs timestamp examples Signed-off-by: devisions --- cli/command/container/logs.go | 4 ++-- cli/command/service/logs.go | 2 +- docs/reference/commandline/logs.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/command/container/logs.go b/cli/command/container/logs.go index d9bc73baff..8dabbfad6b 100644 --- a/cli/command/container/logs.go +++ b/cli/command/container/logs.go @@ -38,8 +38,8 @@ func NewLogsCommand(dockerCli command.Cli) *cobra.Command { flags := cmd.Flags() flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output") - flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)") - flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)") + flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)") + flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)") flags.SetAnnotation("until", "version", []string{"1.35"}) flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps") flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs") diff --git a/cli/command/service/logs.go b/cli/command/service/logs.go index 107c9d2153..deef9dd221 100644 --- a/cli/command/service/logs.go +++ b/cli/command/service/logs.go @@ -59,7 +59,7 @@ func newLogsCommand(dockerCli command.Cli) *cobra.Command { flags.BoolVar(&opts.noTaskIDs, "no-task-ids", false, "Do not include task IDs in output") // options identical to container logs flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output") - flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)") + flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)") flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps") flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs") flags.SetAnnotation("details", "version", []string{"1.30"}) diff --git a/docs/reference/commandline/logs.md b/docs/reference/commandline/logs.md index 76502989e1..36e21f1361 100644 --- a/docs/reference/commandline/logs.md +++ b/docs/reference/commandline/logs.md @@ -15,8 +15,8 @@ Options: --details Show extra details provided to logs -f, --follow Follow log output --help Print usage - --since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes) - --until string Show logs before timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes) + --since string Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) + --until string Show logs before timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) --tail string Number of lines to show from the end of the logs (default "all") -t, --timestamps Show timestamps ```