Skip to content

Commit b5ba0fd

Browse files
committed
Update expr To Preserve Timezone In date
When parsing a string into a Time using the optional timezone parameter to `date`, set the location of the Time to the timezone's location so that Format uses that timezone. See expr-lang/expr#633
1 parent e6da394 commit b5ba0fd

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ require (
4141
golang.org/x/sys v0.18.0 // indirect
4242
gopkg.in/yaml.v3 v3.0.1 // indirect
4343
)
44+
45+
// Can be removed after https://github.com/expr-lang/expr/pull/633 is resolved
46+
replace github.com/expr-lang/expr v1.16.0 => github.com/cwarden/expr v0.0.0-20240423160201-50d02973b2f2

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
1414
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
1515
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
1616
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
17+
github.com/cwarden/expr v0.0.0-20240423160201-50d02973b2f2 h1:kw6RKlmAdX2n7aaTvdN5lag1qsFvuCvzxwgLK5cFhfM=
18+
github.com/cwarden/expr v0.0.0-20240423160201-50d02973b2f2/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ=
1719
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1820
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1921
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

0 commit comments

Comments
 (0)