summaryrefslogtreecommitdiff
path: root/ext/standard/datetime.c
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2004-03-31 17:57:33 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2004-03-31 17:57:33 +0000
commitf8708f369d6279622f97bbbca636377732d4a924 (patch)
treee3d4ca831daa1986875981f36a9b6168a77d38d3 /ext/standard/datetime.c
parent010c340f296243ef78e50664df19b159223850fc (diff)
downloadphp-git-f8708f369d6279622f97bbbca636377732d4a924.tar.gz
disallow negative timestamps on windows only
Diffstat (limited to 'ext/standard/datetime.c')
-rw-r--r--ext/standard/datetime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index b639c37a2f..d033612499 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -1017,9 +1017,11 @@ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm)
if (Z_STRLEN_PP(format_arg)==0) {
RETURN_FALSE;
}
+#ifdef PHP_WIN32
if (timestamp < 0) {
RETURN_FALSE;
}
+#endif
format = Z_STRVAL_PP(format_arg);
if (gm) {
ta = php_gmtime_r(&timestamp, &tmbuf);