Skip to content

Commit 3759749

Browse files
committed
feat: include year in default time format
1 parent 83d0e41 commit 3759749

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ members = [
2323
]
2424

2525
[workspace.package]
26-
version = "0.36.0-alpha.6"
26+
version = "0.36.0-alpha.7"
2727
edition = "2024"
2828
repository = "https://github.com/pamburus/hl"
2929
license = "MIT"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ Output Options:
791791
--raw-fields Output field values as is, without unescaping or prettifying
792792
-h, --hide <KEY> Hide or reveal fields with the specified keys, prefix with ! to reveal, provide '!*' to reveal all
793793
--flatten <WHEN> Whether to flatten objects [env: HL_FLATTEN=] [default: always] [possible values: never, always]
794-
-t, --time-format <FORMAT> Time format, see https://man7.org/linux/man-pages/man1/date.1.html [env: HL_TIME_FORMAT=] [default: "%b %d %T.%3N"]
794+
-t, --time-format <FORMAT> Time format, see https://man7.org/linux/man-pages/man1/date.1.html [env: HL_TIME_FORMAT=] [default: "%Y-%m-%d %T.%3N"]
795795
-Z, --time-zone <TZ> Time zone name, see column "TZ identifier" at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones [env: HL_TIME_ZONE=] [default: UTC]
796796
-L, --local Use local time zone, overrides --time-zone option
797797
--no-local Disable local time zone, overrides --local option

etc/defaults/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#
44
# Time format, see https://man7.org/linux/man-pages/man1/date.1.html for details.
5-
time-format = "%b %d %T.%3N"
5+
time-format = "%Y-%m-%d %T.%3N"
66
#
77
# Time zone name, see column "TZ identifier" at
88
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones page.

src/settings/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use super::*;
44
fn test_default_settings() {
55
let test = |settings: &Settings| {
66
assert_eq!(settings.concurrency, None);
7-
assert_eq!(settings.time_format, "%b %d %T.%3N");
7+
assert_eq!(settings.time_format, "%Y-%m-%d %T.%3N");
88
assert_eq!(settings.time_zone, chrono_tz::UTC);
99
assert_eq!(settings.theme, "uni");
1010
};
@@ -24,7 +24,7 @@ fn test_load_settings_k8s() {
2424
show: FieldShowOption::Always,
2525
})
2626
);
27-
assert_eq!(settings.time_format, "%b %d %T.%3N");
27+
assert_eq!(settings.time_format, "%Y-%m-%d %T.%3N");
2828
assert_eq!(settings.time_zone, chrono_tz::UTC);
2929
assert_eq!(settings.theme, "uni");
3030
}

0 commit comments

Comments
 (0)