Skip to content

Conversation

TristonianJones
Copy link
Collaborator

@TristonianJones TristonianJones commented Jun 30, 2022

Currently, unary member functions on timestamp values in cel-go will use whatever the timezone is of the input object. However, this is not what is specified in the spec and can result in differences in evaluation behavior depending on where the call takes place. This fixes an issue with spec-conformance and should be enabled by default in future releases. To opt-in or opt-out see the usage below.

Usage: cel.NewEnv(cel.DefaultUTCTimeZone(true))

Closes #468 by ensuring that all time operations are in UTC by default.

@TristonianJones TristonianJones requested a review from jpbetz June 30, 2022 01:36
@TristonianJones TristonianJones force-pushed the fix-timezone-offset branch 2 times, most recently from 9c113a3 to cd6791c Compare June 30, 2022 16:09
@TristonianJones TristonianJones requested a review from jcking July 1, 2022 18:47
@TristonianJones TristonianJones merged commit c04cadc into google:master Jul 6, 2022
@TristonianJones TristonianJones deleted the fix-timezone-offset branch July 6, 2022 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getHours() uses timezone of timestamp not UTC

2 participants