Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

feat: show build log timestamps in local time#241

Merged
jawnsy merged 1 commit intomasterfromjawnsy/ch8016/cli-local-timezone
Feb 12, 2021

Conversation

jawnsy
Copy link
Contributor

The server-sent ISO8601 timestamps are not necessarily in the user's
preferred timezone. This change uses time.Local() to get the time in
the user's local time according to their system settings.

Success case, interactive terminal:

[coder@jawnsy-m coder-cli]$coder envs watch-build jawnsy-mwarning: version mismatch detected  | Coder CLI version: unknown  | Coder API version: 1.14.0+709-g75124e3d4-20210211  |  | tip: download the appropriate version here: https://github.com/cdr/coder-cli/releases✅ -- 2021-02-11T16:21:12-08:00 Your environment was queued for rebuilding✅ -- 2021-02-11T16:21:16-08:00 Deleting old environment✅ -- 2021-02-11T16:21:16-08:00 Deleting old network isolation policy✅ -- 2021-02-11T16:21:16-08:00 Deleting old service✅ -- 2021-02-11T16:21:16-08:00 Getting default user from image✅ -- 2021-02-11T16:22:15-08:00 Ensuring environment has a home volume✅ -- 2021-02-11T16:22:15-08:00 Creating network isolation policy✅ -- 2021-02-11T16:22:15-08:00 Creating environment service✅ -- 2021-02-11T16:22:15-08:00 Creating environment✅ -- 2021-02-11T16:22:56-08:00 Initializing environment as container-based virtual machine✅ -- 2021-02-11T16:22:56-08:00 Pulling image gcr.io/coder-dogfood/master/enterprise-dev✅ -- 2021-02-11T16:25:29-08:00 Mounting volumes into environment✅ -- 2021-02-11T16:25:29-08:00 Starting environment /sbin/init✅ -- 2021-02-11T16:25:29-08:00 Creating container✅ -- 2021-02-11T16:25:31-08:00 Starting environment✅ -- 2021-02-11T16:25:31-08:00 Waiting for environment to become available✅ -- 2021-02-11T16:25:33-08:00 Injecting secrets into environment✅ -- 2021-02-11T16:25:33-08:00 Configuring Git✅ -- 2021-02-11T16:25:33-08:00 Running /coder/configure✅ -- 2021-02-11T16:25:36-08:00 Running ~/personalize

Success case, non-interactive terminal:

[coder@jawnsy-m coder-cli]$coder envs watch-build jawnsy-m| catwarning: version mismatch detected  | Coder CLI version: unknown  | Coder API version: 1.14.0+709-g75124e3d4-20210211  |  | tip: download the appropriate version here: https://github.com/cdr/coder-cli/releases2021-02-11T16:21:12-08:00 Your environment was queued for rebuilding2021-02-11T16:21:16-08:00 Deleting old environment2021-02-11T16:21:16-08:00 Deleting old network isolation policy2021-02-11T16:21:16-08:00 Deleting old service2021-02-11T16:21:16-08:00 Getting default user from image2021-02-11T16:22:15-08:00 Ensuring environment has a home volume2021-02-11T16:22:15-08:00 Creating network isolation policy2021-02-11T16:22:15-08:00 Creating environment service2021-02-11T16:22:15-08:00 Creating environment2021-02-11T16:22:56-08:00 Initializing environment as container-based virtual machine2021-02-11T16:22:56-08:00 Pulling image gcr.io/coder-dogfood/master/enterprise-dev2021-02-11T16:25:29-08:00 Mounting volumes into environment2021-02-11T16:25:29-08:00 Starting environment /sbin/init2021-02-11T16:25:29-08:00 Creating container2021-02-11T16:25:31-08:00 Starting environment2021-02-11T16:25:31-08:00 Waiting for environment to become available2021-02-11T16:25:33-08:00 Injecting secrets into environment2021-02-11T16:25:33-08:00 Configuring Git2021-02-11T16:25:33-08:00 Running /coder/configure2021-02-11T16:25:36-08:00 Running ~/personalize[coder@jawnsy-m coder-cli]$TZ=America/Toronto coder envs watch-build jawnsy-m| catwarning: version mismatch detected  | Coder CLI version: unknown  | Coder API version: 1.14.0+709-g75124e3d4-20210211  |  | tip: download the appropriate version here: https://github.com/cdr/coder-cli/releases2021-02-11T19:21:12-05:00 Your environment was queued for rebuilding2021-02-11T19:21:16-05:00 Deleting old environment2021-02-11T19:21:16-05:00 Deleting old network isolation policy2021-02-11T19:21:16-05:00 Deleting old service2021-02-11T19:21:16-05:00 Getting default user from image2021-02-11T19:22:15-05:00 Ensuring environment has a home volume2021-02-11T19:22:15-05:00 Creating network isolation policy2021-02-11T19:22:15-05:00 Creating environment service2021-02-11T19:22:15-05:00 Creating environment2021-02-11T19:22:56-05:00 Initializing environment as container-based virtual machine2021-02-11T19:22:56-05:00 Pulling image gcr.io/coder-dogfood/master/enterprise-dev2021-02-11T19:25:29-05:00 Mounting volumes into environment2021-02-11T19:25:29-05:00 Starting environment /sbin/init2021-02-11T19:25:29-05:00 Creating container2021-02-11T19:25:31-05:00 Starting environment2021-02-11T19:25:31-05:00 Waiting for environment to become available2021-02-11T19:25:33-05:00 Injecting secrets into environment2021-02-11T19:25:33-05:00 Configuring Git2021-02-11T19:25:33-05:00 Running /coder/configure2021-02-11T19:25:36-05:00 Running ~/personalize

Error case, interactive terminal:

image

Error case, non-interactive terminal (piped command through cat):

image

The server-sent ISO8601 timestamps are not necessarily in the user'spreferred timezone. This change uses time.Local() to get the time inthe user's local time according to their system settings.
@jawnsyjawnsy self-assigned thisFeb 12, 2021
@shortcut-integration
Copy link

This pull request has been linked toClubhouse Story #8016: coder-cli build log should use local timezone.

Copy link
Contributor

@cmoogcmoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Great improvement 👍

@jawnsyjawnsy merged commit4eafe01 intomasterFeb 12, 2021
@jawnsyjawnsy deleted the jawnsy/ch8016/cli-local-timezone branchFebruary 12, 2021 02:44
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@cmoogcmoogcmoog approved these changes

@tychoishtychoishAwaiting requested review from tychoish

Assignees

@jawnsyjawnsy

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jawnsy@cmoog

[8]ページ先頭

©2009-2025 Movatter.jp