diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-01-16 21:02:14 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-01-16 21:02:14 -0700 |
commit | 865c3e375a598e5a0f7d9e690eda4702de8658af (patch) | |
tree | 316822fc5b4c8f8a6be584709225f522708a9130 /numpy/core/arrayprint.py | |
parent | 2f7827702ef6b6ac4b318103d5c0dfe2ff6e7eb3 (diff) | |
parent | da98bbc030c272edb1a8548a458b3957e29ce346 (diff) | |
download | numpy-865c3e375a598e5a0f7d9e690eda4702de8658af.tar.gz |
Merge pull request #6453 from shoyer/naive-datetime64
API: Make datetime64 timezone naive
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index c5b5b5a8f..74a9d3da3 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -708,9 +708,9 @@ class ComplexFormat(object): i = i + 'j' return r + i + class DatetimeFormat(object): - def __init__(self, x, unit=None, - timezone=None, casting='same_kind'): + def __init__(self, x, unit=None, timezone=None, casting='same_kind'): # Get the unit from the dtype if unit is None: if x.dtype.kind == 'M': @@ -718,15 +718,9 @@ class DatetimeFormat(object): else: unit = 's' - # If timezone is default, make it 'local' or 'UTC' based on the unit if timezone is None: - # Date units -> UTC, time units -> local - if unit in ('Y', 'M', 'W', 'D'): - self.timezone = 'UTC' - else: - self.timezone = 'local' - else: - self.timezone = timezone + timezone = 'naive' + self.timezone = timezone self.unit = unit self.casting = casting |