8000 `validate_datetime_from_something`: tz support · Issue #370 · sosw/sosw · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
validate_datetime_from_something: tz support #370
@ngr

Description

@ngr

If we know the timezone that some string that we are converting is represented with - pass this optional attr in_tz.
Then the function should respect that when parsing the str

Make very good tests to this.

Example:

result = validate_datetime_from_something("2025-01-10T12:00:00"), in_tz="America/Los_Angeles")

Should be equal to datetime.datetime(2025, 1, 10, 5, 0, 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0