Skip to content

Parsing helper for working with different types and formats of timestamp - #1414

Open
TristonianJones wants to merge 1 commit into
cel-expr:masterfrom
TristonianJones:parse-time
Open

Parsing helper for working with different types and formats of timestamp#1414
TristonianJones wants to merge 1 commit into
cel-expr:masterfrom
TristonianJones:parse-time

Conversation

@TristonianJones

Copy link
Copy Markdown
Collaborator

Simplify working with timestamps that could come from JSON or other sources.

name: "float64",
val: float64(1700000000.5),
want: epochFloatTime,
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you: it may be worth a test case for converting negative numbers / before unix epoch. (I think the math looks right, just suggesting for completeness)

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.

2 participants