]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Mon, 3 Feb 2003 22:48:35 +0000 (22:48 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 3 Feb 2003 22:48:35 +0000 (22:48 +0000)
ext/standard/datetime.c

index 260271590be21f70f203a41bdbdcc2e248283d3f..13b92322f0f44fb60a8e78869274345d101c2fac 100644 (file)
@@ -286,6 +286,12 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm)
                }
                convert_to_long_ex(timestamp);
                the_time = Z_LVAL_PP(timestamp);
+#ifdef PHP_WIN32
+               if (the_time < 0) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Windows does not support dates prior to midnight (00:00:00), January 1, 1970");
+                       RETURN_FALSE;
+               }
+#endif
                break;
        default:
                WRONG_PARAM_COUNT;