Commit cfbfc1b6f60 for php.net
commit cfbfc1b6f60fa4383a98810b5204363e0d786fb0
Author: Derick Rethans <github@derickrethans.nl>
Date: Wed Jan 14 14:16:40 2026 +0000
Revert "Upgrade timelib to 2022.16"
This reverts commit e208cd86b4d3298bfda71f349ef0838aa197fce0.
diff --git a/NEWS b/NEWS
index 8ca750b7d51..f20e8d63b02 100644
--- a/NEWS
+++ b/NEWS
@@ -2,8 +2,6 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.3.31
-- Date:
- . Update timelib to 2022.15. (Derick)
15 Jan 2026, PHP 8.3.30
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index ffb3e8e3591..c40a5c07c9a 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -169,14 +169,7 @@ static const timelib_tz_lookup_table timelib_timezone_utc[] = {
};
#if defined(_POSIX_TZNAME_MAX)
-/* Solaris exposes _POSIX_TZNAME_MAX = 3 unless _XPG6 is defined.
- * That is too small for real-world timezone abbreviations ("EDT", "CEST", ...).
- */
-# if defined(__sun__) && _POSIX_TZNAME_MAX < 6
-# define MAX_ABBR_LEN 6
-# else
-# define MAX_ABBR_LEN _POSIX_TZNAME_MAX
-# endif
+# define MAX_ABBR_LEN _POSIX_TZNAME_MAX
#elif defined(TZNAME_MAX)
# define MAX_ABBR_LEN TZNAME_MAX
#else
@@ -2020,10 +2013,10 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain
in.errors->error_messages = NULL;
if (len > 0) {
- while (isspace((unsigned char)*s) && s < e) {
+ while (isspace(*s) && s < e) {
s++;
}
- while (isspace((unsigned char)*e) && e > s) {
+ while (isspace(*e) && e > s) {
e--;
}
}
diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h
index acae8e32533..ef57a7ee783 100644
--- a/ext/date/lib/timelib.h
+++ b/ext/date/lib/timelib.h
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
- * Copyright (c) 2015-2026 Derick Rethans
+ * Copyright (c) 2015-2025 Derick Rethans
* Copyright (c) 2018,2021 MongoDB, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -30,9 +30,9 @@
# include "timelib_config.h"
#endif
-#define TIMELIB_VERSION 202215
-#define TIMELIB_EXTENDED_VERSION 20221501
-#define TIMELIB_ASCII_VERSION "2022.15"
+#define TIMELIB_VERSION 202214
+#define TIMELIB_EXTENDED_VERSION 20221401
+#define TIMELIB_ASCII_VERSION "2022.14"
#include <stdlib.h>
#include <stdbool.h>