Skip to content

feat(l1): always use UTC time #2441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat(l1): always use UTC time #2441

wants to merge 2 commits into from

Conversation

iovoid
Copy link
Contributor

@iovoid iovoid commented Apr 10, 2025

Motivation

As described in #2315, we want to always use UTC time.

Description

The chrono library is used to correct the offsets.

Error handling is default-based because timestamps greater than 2^63/1000 don't make sense.

Closes #2315

@iovoid iovoid requested a review from a team as a code owner April 10, 2025 21:10
Copy link

Lines of code report

Total lines added: 0
Total lines removed: 9
Total lines changed: 9

Detailed view
+------------------------------------------------+-------+------+
| File                                           | Lines | Diff |
+------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/discv4/helpers.rs | 14    | -9   |
+------------------------------------------------+-------+------+

@@ -36,6 +36,8 @@ aes = "0.8.4"
ctr = "0.9.2"
rand = "0.8.5"

chrono = "0.4"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we achieve the same without introducing a dependency?

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.

Enforcing absolute timestamps in Networking Protocols
2 participants