Skip to content

Conversation

@Peacanduck
Copy link

added check to convert timestamp to ms and remved the default + 1hour

// chrono timestamp in ms, 1 hour from now
Self::AbsoluteTimestamp(Utc::now().timestamp_millis() as u64 + 3600000)
// chrono timestamp in ms, 1 hour from now + 3600000 removed
Self::AbsoluteTimestamp(Utc::now().timestamp_millis() as u64)
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, it doesn't really make sense to me for the default time to be now - why would the user time travel to now?

Copy link
Author

Choose a reason for hiding this comment

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

Hmm, it doesn't really make sense to me for the default time to be now - why would the user time travel to now?

when time traveling it to say x time it ends up (x time + 1hour) so seems like default value is still being applied when entering your own value

// FIX: Convert timestamp from seconds to milliseconds if needed
if let TimeTravelConfig::AbsoluteTimestamp(ref mut ts) = time_travel_config {
// comment If timestamp is in seconds (< 10 billion), convert to milliseconds
if *ts < 10_000_000_000 {
Copy link
Member

Choose a reason for hiding this comment

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

I think I'd rather be clear in the docs + erroring that the timestamp should be in ms, rather than play this guessing game of should we/should we not convert. Thoughts @lgalabru?

Copy link
Author

Choose a reason for hiding this comment

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

I think I'd rather be clear in the docs + erroring that the timestamp should be in ms, rather than play this guessing game of should we/should we not convert. Thoughts @lgalabru?

Ideally fixing the source of the bug would be best I'm just not sure where to find the timeTravel ui i think that may be where it is

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