summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcamcui <166618273+camcui@users.noreply.github.com>2024-04-26 23:40:18 +0800
committerGitHub <noreply@github.com>2024-04-26 11:40:18 -0400
commita0f96abea48282aef566052f14a49188d1be1fd7 (patch)
tree6555381bbb4a669f49b0d566bfd9a931637c525c
parenta4f52465e7cfacb045f9d87dd913de1216839ee9 (diff)
Replace custom strings with constants from the standard library (#537)
-rw-r--r--log/command.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/log/command.go b/log/command.go
index 32a3498..7ea959e 100644
--- a/log/command.go
+++ b/log/command.go
@@ -46,9 +46,9 @@ func (o Options) Run() error {
"stampmilli": time.StampMilli,
"stampmicro": time.StampMicro,
"stampnano": time.StampNano,
- "datetime": "2006-01-02 15:04:05",
- "dateonly": "2006-01-02",
- "timeonly": "15:04:05",
+ "datetime": time.DateTime,
+ "dateonly": time.DateOnly,
+ "timeonly": time.TimeOnly,
}
tf, ok := timeFormats[strings.ToLower(o.Time)]