LoslegenKostenlos loslegen

Creating timezone aware datetimes

In this exercise, you will practice setting timezones manually.

Diese Übung ist Teil des Kurses

Working with Dates and Times in Python

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Import datetime, timezone
from datetime import datetime, ____

# October 1, 2017 at 15:26:26, UTC
dt = datetime(2017, 10, 1, 15, 26, 26, tzinfo=____)

# Print results
print(dt.isoformat())
Code bearbeiten und ausführen