Skip to content

Fix SQLite time zone reading#2878

Open
Huliiiiii wants to merge 1 commit intoSeaQL:masterfrom
Huliiiiii:sqlite-tz
Open

Fix SQLite time zone reading#2878
Huliiiiii wants to merge 1 commit intoSeaQL:masterfrom
Huliiiiii:sqlite-tz

Conversation

@Huliiiiii
Copy link
Member

Closes #2319

@Kitt3120
Copy link

Kitt3120 commented Feb 26, 2026

hey, are you still working on this?

I am currently doing this on my model as a workaround:

impl Model {
    pub fn timestamp_local(
        &self,
    ) -> Result<TimeDateTimeWithTimeZone, time::error::IndeterminateOffset> {
        let ts = self.timestamp;
        Ok(ts.to_offset(UtcOffset::local_offset_at(ts)?))
    }
}

So I am using the normalized timestamps everywhere internally, and when I have to display the actual localized timestamp somewhere, I use timestamp_local().

@Huliiiiii Huliiiiii requested a review from tyt2y3 February 26, 2026 11:45
Comment on lines 580 to 582
Copy link
Member

Choose a reason for hiding this comment

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

should we change rusqlite as well? same logic applies

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.

Timezone offset information lost when reading a ChronoDateTimeWithTimeZone

3 participants