timestamp
property in the protocol should be DateTime<Utc>
, not SystemTime
#553
Labels
timestamp
property in the protocol should be DateTime<Utc>
, not SystemTime
#553
Environment
sentry-cli
, current master, which depends onsentry-types
v0.29.3Steps to Reproduce
I ran into this after enabling this Sentry-CLI test case on my Windows PC.
That panics with
overflow when adding duration to instant
onSystemTime::from()
because the given timestamp in the test case overflows what can be represented by SystemTime on Windows.You can also reproduce this simply by running the following code on Windows.
Change request
As the event timestamp is currently represented by
SystemTime
, which depends on the operating system and architecture (the same would also fail on any 32-bit platform), thesentry-types
crate cannot be used generally to access (deserialize) events produced by other platforms, if, for whatever reason, they include timestamps out of the range representable bySystemTime
.Instead, I'd suggest evaluating the whole repository for all uses of
SystemTime
as a struct field or an argument, etc. and consider changing them toDateTime<Utc>
which, in the given example ofevent.timestamp
, is the actual type of the value.The text was updated successfully, but these errors were encountered: