Skip to content

Commit c67d89c

Browse files
committed
Merge pull request #273 from alpha-beta-soup/iss272
fix #272
2 parents 8872dbc + 2d50a82 commit c67d89c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4700,9 +4700,9 @@ def nightshade(self,date,color="k",delta=0.25,alpha=0.5,ax=None,zorder=2):
47004700
returns a matplotlib.contour.ContourSet instance.
47014701
"""
47024702
from .solar import daynight_grid
4703-
# make sure date is utc.
4704-
if date.utcoffset() is not None:
4705-
raise ValueError('datetime instance must be UTC')
4703+
# make sure date is UTC, or naive with repect to time zones
4704+
if date.utcoffset():
4705+
raise ValueError('datetime instance must be UTC, not {}'.format(date.tzname()))
47064706
# create grid of day=0, night=1
47074707
lons,lats,daynight = daynight_grid(date,delta,self.lonmin,self.lonmax)
47084708
x,y = self(lons,lats)

0 commit comments

Comments
 (0)