Improve example for epoch -> datetime (#14886)

Better example for `into datetime` with Unix epoch
This commit is contained in:
Douglas
2025-01-21 15:39:39 -05:00
committed by GitHub
parent 0666b3784f
commit cdb082e92d

View File

@ -205,13 +205,13 @@ impl Command for SubCommand {
}, },
Example { Example {
description: "Convert standard (seconds) unix timestamp to a UTC datetime", description: "Convert standard (seconds) unix timestamp to a UTC datetime",
example: "1614434140 * 1_000_000_000 | into datetime", example: "1614434140 | into datetime -f '%s'",
#[allow(clippy::inconsistent_digit_grouping)] #[allow(clippy::inconsistent_digit_grouping)]
result: example_result_1(1614434140_000000000), result: example_result_1(1614434140_000000000),
}, },
Example { Example {
description: "Leave it as it is when the input is already a datetime", description: "Using a datetime as input simply returns the value",
example: "1614434140 * 1_000_000_000 | into datetime | into datetime", example: "2021-02-27T13:55:40 | into datetime",
#[allow(clippy::inconsistent_digit_grouping)] #[allow(clippy::inconsistent_digit_grouping)]
result: example_result_1(1614434140_000000000), result: example_result_1(1614434140_000000000),
}, },