Repository navigation
Times without a time zone are UTC; Lighter account summaries; positions freshness - #16
Merged
Merged
Conversation
…ns freshness - Timestamp strings without an offset and dates alone convert as UTC; before, they silently became 0. From<NaiveDateTime> and From<NaiveDate> for Timestamp, as UTC. - LighterPositionsResource: account() and account_history() (position aggregates, now and hourly); a dex is refused before sending. - DataQualityResource::positions_freshness() and PositionsFreshness. - README: the sla() example passes both arguments.
0xFantomMenace
added a commit
that referenced
this pull request
Sep 29, 2026
…ns freshness (#16) - Timestamp strings without an offset and dates alone convert as UTC; before, they became 0. From<NaiveDateTime> and From<NaiveDate> for Timestamp, as UTC. - LighterPositionsResource: account() and account_history(). - DataQualityResource::positions_freshness() and PositionsFreshness.
0xFantomMenace
added a commit
that referenced
this pull request
Sep 29, 2026
…ns freshness (#16) - Timestamp strings without an offset and dates alone convert as UTC; before, they became 0. From<NaiveDateTime> and From<NaiveDate> for Timestamp, as UTC. - LighterPositionsResource: account() and account_history(). - DataQualityResource::positions_freshness() and PositionsFreshness.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes for 1.12.0: times without a time zone are UTC, and the account summary and positions freshness routes get wrappers.
Times without a time zone are UTC
Timestamp::to_millis()reads a date alone ("2026-09-01", midnight UTC) and a date-time without an offset ("2026-09-01T00:00:00", with aTor a space) as UTC. RFC 3339 strings with an offset and strings of digits work as before.0.From<chrono::NaiveDateTime>andFrom<chrono::NaiveDate>forTimestamp, converted as UTC.TZ=America/New_York.New wrappers
LighterPositionsResource::account(account_index)andaccount_history(account_index, AccountHistoryParams)onclient.lighter.positionsandclient.rh_lighter.positions, returningMetaResponse<Vec<AccountSummary>>with the account's position aggregates. Adexis refused before sending.DataQualityResource::positions_freshness(), returningVec<PositionsFreshness>.sla()example passes both arguments.Checks
cargo test --all-features: 92 passed on stable, underTZ=America/New_York, and on Rust 1.85 with a freshly resolved lockfile.cargo clippy --all-features --all-targets -- -D warningsandRUSTDOCFLAGS="-D warnings" cargo docare clean.