Use utcnow
:
today = datetime.datetime.utcnow().date()
Related Contents:
- Is there a list of Pytz Timezones?
- How to make a timezone aware datetime object
- How can I remove a pytz timezone from a datetime object?
- How to check if a datetime object is localized with pytz?
- How to get system timezone setting and pass it to pytz.timezone?
- How do I get the UTC time of “midnight” for a given timezone?
- Converting python datetime to timestamp and back in UTC still uses local timezone
- pytz localize vs datetime replace
- How to make a datetime object aware (not naive) in Python?
- Python pytz timezone function returns a timezone that is off by 9 minutes
- pytz – Converting UTC and timezone to local time
- How to add timezone into a naive datetime instance in python [duplicate]
- Weird timezone issue with pytz
- Python datetime object show wrong timezone offset
- Could not find a version that satisfies the requirement pytz
- pytz and astimezone() cannot be applied to a naive datetime
- How do you convert a datetime/timestamp from one timezone to another timezone?
- unexpected results converting timezones in python
- How to make a datetime object aware (not naive)
- pytz utc conversion
- How to get the common name for a pytz timezone eg. EST/EDT for America/New_York
- How do I find the duplicates in a list and create another list with them?
- Get the first item from an iterable that matches a condition
- How can I check if a key exists in a dictionary? [duplicate]
- How to loop backwards in python? [duplicate]
- What is the maximum float in Python?
- Instance attribute attribute_name defined outside __init__
- Flask raises TemplateNotFound error even though template file exists
- Difference between dict.clear() and assigning {} in Python
- Mocking a class: Mock() or patch()?
- What is the difference between json.dumps and json.load? [closed]
- Is there a python equivalent of Ruby’s ‘rvm’?
- How to copy directory recursively in python and overwrite all?
- Check if an object exists
- Convert dictionary entries into variables [duplicate]
- add vs update in set operations in python
- Equivalent of Bash Backticks in Python [duplicate]
- Correct Type annotation for __init__
- Cross-platform space remaining on volume using python
- Getting Python’s unittest results in a tearDown() method
- request.user returns a SimpleLazyObject, how do I “wake” it?
- Does python optimize modules when they are imported multiple times?
- How to move pandas data from index to column after multiple groupby
- ImportError: cannot import name ‘html5lib’ from ‘pip._vendor’ (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py) [duplicate]
- MATLAB-style find() function in Python
- What are the differences between lxml and ElementTree?
- OData Python Library available?
- Streaming data with Python and Flask
- plotting a histogram on a Log scale with Matplotlib
- How to return all the minimum indices in numpy