約113,000件1ページ目

日本語のみで絞り込む

2010/12/30 -The localize function converts a naive datetime object into a timezone-aware datetime object. Then you can use the astimezone method to convert ...

The timezone class can represent simple time zones with fixed offsets from UTC, such as UTC itself or North American EST and EDT time zones. Supporting time ...

2024/2/17 -I'm in Europe/Helsinki timezone, or +02:00 UTC. Instead of replacing the timezone of the datetime.datetime object separately, we can also call ...

2024/10/31 -Every month on the 1st it will replace the day to be the current timezone AEST+10 which is the 1st but UTC should still be the 31st so the 90 ...

2023/11/18 -Note that if you are using Python 3.11 or newer, you can replace datetime.timezone.utc with a shorter datetime.UTC . Running this script I get ...

2020/5/13 -This is a quick summary of handling timezone conversions with datetime objects in Python ... utcnow = utcnow.replace(tzinfo=pytz.utc). you should ...

2026/5/20 -Description. datetime.utcnow() has been deprecated since Python 3.12 and emits a DeprecationWarning on Python 3.12+.

2025/7/12 -datetime.datetime.now(timezone.utc) gets the current date and time in UTC by using timezone.utc as the time zone. dt.replace(tzinfo=timezone.utc) ...

2022/10/9 -The problem with datetime.utcnow() and datetime.utcfromtimestamp() occurs because these return naïve datetimes (i.e. with no timezone attached), ...

2022/11/9 -Use datetime.timezone.utc instead of pytz.UTC . Use the datetime constructor parameter tzinfo or .replace() instead ...