Skip to content

epoch parsing with timezone other than UTC #66

Closed
@matrixhead

Description

@matrixhead

hi, i think our epoch parsing is not working properly.

if we try to run test_epoch_seconds it would work but if we try changing the timezone to something like env::set_var("TZ", "EST") it would fail. it shouldn't be doing that right? because epoch's should be same even if we change the timezone.

i think it is happening because we are treating NaiveDateTime returned by from_timestamp_opt (which is in UTC) as local time in naive_dt_to_fixed_offset and i think we could fix it by treating it as UTC

if you guys think i'm right can i put together a pr with the necessary changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions