From f9f340b6bfc514c29741ddb2f205d5a28ca43c92 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Thu, 2 Feb 2023 12:47:59 +1100 Subject: [PATCH] Github pipeline not in AU tz :D --- pkg/yqlib/doc/operators/datetime.md | 4 ++-- pkg/yqlib/operator_datetime_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/yqlib/doc/operators/datetime.md b/pkg/yqlib/doc/operators/datetime.md index 3a2fb72d..7bf9c24d 100644 --- a/pkg/yqlib/doc/operators/datetime.md +++ b/pkg/yqlib/doc/operators/datetime.md @@ -91,11 +91,11 @@ Converts from unix time Running ```bash -yq --null-input '1675301929 | from_unix' +yq --null-input '1675301929 | from_unix | tz("UTC")' ``` will output ```yaml -2023-02-02T12:38:49+11:00 +2023-02-02T01:38:49Z ``` ## Timezone: from standard RFC3339 format diff --git a/pkg/yqlib/operator_datetime_test.go b/pkg/yqlib/operator_datetime_test.go index 74b81390..b326a254 100644 --- a/pkg/yqlib/operator_datetime_test.go +++ b/pkg/yqlib/operator_datetime_test.go @@ -42,9 +42,9 @@ var dateTimeOperatorScenarios = []expressionScenario{ { description: "From Unix", subdescription: "Converts from unix time", - expression: `1675301929 | from_unix`, + expression: `1675301929 | from_unix | tz("UTC")`, expected: []string{ - "D0, P[], (!!timestamp)::2023-02-02T12:38:49+11:00\n", + "D0, P[], (!!timestamp)::2023-02-02T01:38:49Z\n", }, }, {