diff --git a/lib/cartopy/feature/nightshade.py b/lib/cartopy/feature/nightshade.py index 5a0fa310a..49c3c44f0 100644 --- a/lib/cartopy/feature/nightshade.py +++ b/lib/cartopy/feature/nightshade.py @@ -22,7 +22,7 @@ def __init__(self, date=None, delta=0.1, refraction=-0.83, ---------- date : datetime A UTC datetime object used to calculate the position of the sun. - Default: datetime.datetime.utcnow() + Default: The current UTC time. delta : float Stepsize in degrees to determine the resolution of the night polygon feature (``npts = 180 / delta``). @@ -38,7 +38,7 @@ def __init__(self, date=None, delta=0.1, refraction=-0.83, """ if date is None: - date = datetime.datetime.utcnow() + date = datetime.datetime.now(datetime.UTC) # make sure date is UTC, or naive with respect to time zones if date.utcoffset():