]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19634: time.strftime("%y") now raises a ValueError on Solaris when given
authorVictor Stinner <victor.stinner@gmail.com>
Sat, 23 Nov 2013 13:59:33 +0000 (14:59 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Sat, 23 Nov 2013 13:59:33 +0000 (14:59 +0100)
a year before 1900.

Modules/timemodule.c

index ca399069948aabdd60f21b30d5d710be3f9035ff..d3878b95d99fbdb5b17e5660cd036d01939c7b36 100644 (file)
@@ -650,7 +650,7 @@ time_strftime(PyObject *self, PyObject *args)
             return NULL;
         }
     }
-#elif defined(_AIX) && defined(HAVE_WCSFTIME)
+#elif (defined(_AIX) || defined(sun)) && defined(HAVE_WCSFTIME)
     for(outbuf = wcschr(fmt, '%');
         outbuf != NULL;
         outbuf = wcschr(outbuf+2, '%'))