Last active
December 23, 2020 11:22
-
-
Save mrroot5/c97af91645399209f948f80be46a8f6b to your computer and use it in GitHub Desktop.
Create datetime with django date settings. Keywords: django, django dates, django datetime, django date settings, django create date with default settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dateutil.parser | |
datetime_str_with_offset = '2025-08-25 11:47:58-01' | |
dateutil.parser.parse(datetime_str_with_offset) | |
# Output | |
# datetime.datetime(2025, 8, 25, 11, 47, 58, tzinfo=tzoffset(None, -3600)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python-dateutil==2.8.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment