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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ngr opened this issue Mar 30, 2025 · 0 comments
Open

validate_datetime_from_something: tz support #370

ngr opened this issue Mar 30, 2025 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ngr
Copy link
Member
ngr commented Mar 30, 2025

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)

@ngr ngr added enhancement New feature or request good first issue Good for newcomers labels Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant
0