Skip to content

Commit

Permalink
Update expr To Preserve Timezone In date
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cwarden committed Apr 23, 2024
1 parent e6da394 commit b5ba0fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ require (
golang.org/x/sys v0.18.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

// Can be removed after https://github.com/expr-lang/expr/pull/633 is resolved
replace github.com/expr-lang/expr v1.16.0 => github.com/cwarden/expr v0.0.0-20240423160201-50d02973b2f2
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cwarden/expr v0.0.0-20240423160201-50d02973b2f2 h1:kw6RKlmAdX2n7aaTvdN5lag1qsFvuCvzxwgLK5cFhfM=
github.com/cwarden/expr v0.0.0-20240423160201-50d02973b2f2/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down

0 comments on commit b5ba0fd

Please sign in to comment.