Skip to content

Conversation

@petrosagg
Copy link

No description provided.

Andreas Sommer and others added 30 commits May 3, 2024 11:01
The impl now directly computes `Timestamp` rather than going through
`DateTime` and `Zoned`.
`Timestamp` already has impl and is semantically accurate for mapping to `timestamptz`, unlike `Zoned`.
End users can do their own conversions from `Timestamp` to `Zoned` if desired.
This sets the smallest unit to microseconds when calculating time deltas.

Previously, the number of microseconds was expressed improperly because
the rounding was not set.
This adds tests in the same fashion as the existing ones for `chrono`
and `time`.

Overflow is now handled using fallible operations.
For example, `Span:microseconds` is replaced with `Span::try_microseconds`.
Postgres infinity values are workiing as expected.

All tests are passing.
The implementation was previously removed as per jiff author comment.
`test_date_time_params` and `test_with_special_date_time_params` could fail when run with a non-UTC system time zone.

In Postgres, if no time zone is stated in the input string, then it is assumed to be in system time.
This means that in these tests, a correctly parsed `DateTime<Utc>` could be compared to an incorrectly offset time.

The offset component is now included in the test strings of these tests. This component is already present in the test strings for `time::OffsetDateTime`.
add `load_balance_hosts` to `Debug` impl for `Config`
Getting `PrimitiveDateTime` panics if the value is infinity.
This commit fixes the panic.

An infinity test is added, mirroring the existing one for chrono.
paolobarbolini and others added 29 commits September 25, 2025 09:56
…ni/jiff-no-default-features

feat(postgres-types): disable default features of `jiff`
…n-closure

Improve is_closed effectiveness
Co-authored-by: Tristan Partin <tristan@partin.io>
…ni/pg-18

chore: start testing with PostgreSQL 18
…ni/futures-util-no-default-features

feat: disable default features of `futures-util` for `postgres`
Types implementing the Error trait should print some inner Error **xor**
return that inner Error from its Error::source impl. Otherwise, the same
error will be printed multiple times when printing an Error's entire
source chain, which is unhelpful.
…ni/check_connection-doc-comment

Improve `check_connection` doc comment
Expose simple query raw method in tokio postgres
Implement FromSql for Box<T: FromSql> and ToSql for Box<T: ToSql>
chore: reflect with-jiff-0_2 feature in docs
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
@petrosagg petrosagg merged commit f0b4df2 into master Dec 3, 2025
4 checks passed
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.