Skip to content
Permalink
Browse files

Wrong if clause.

  • Loading branch information...
krischer committed Feb 14, 2019
1 parent 8161c20 commit 5802db3db4be93817fe0836c3869dfb3c0cee671
Showing with 4 additions and 1 deletion.
  1. +4 −1 obspy/core/utcdatetime.py
@@ -1260,8 +1260,11 @@ def strftime(self, format):
See methods :meth:`~datetime.datetime.strftime()` and
:meth:`~datetime.datetime.strptime()` for more information.
"""
if sys.version_info.major < 3 and sys.platform.startswith("linux"):
# See https://bugs.python.org/issue32195
# This is an attempt to get consistent behavior across platforms.
if sys.version_info.major > 2 and sys.platform.startswith("linux"):
format = format.replace("%Y", "%04Y")

try:
ret = self.datetime.strftime(format)
# this is trying to work around strftime refusing to work with years

0 comments on commit 5802db3

Please sign in to comment.
You can’t perform that action at this time.