Skip to content

Commit 9d4a1f0

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Upgrade timelib to 2022.16
2 parents 65e316e + e208cd8 commit 9d4a1f0

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ PHP NEWS
1010
. Fixed bug GH-GH-20914 (Internal enums can be cloned and compared). (Arnaud)
1111
. Fix OSS-Fuzz #474613951 (Leaked parent property default value). (ilutov)
1212

13+
- Date:
14+
. Update timelib to 2022.16. (Derick)
15+
1316
- MbString:
1417
. Fixed bug GH-20833 (mb_str_pad() divide by zero if padding string is
1518
invalid in the encoding). (ndossche)

ext/date/lib/parse_date.re

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,14 @@ static const timelib_tz_lookup_table timelib_timezone_utc[] = {
169169
};
170170

171171
#if defined(_POSIX_TZNAME_MAX)
172-
# define MAX_ABBR_LEN _POSIX_TZNAME_MAX
172+
/* Solaris exposes _POSIX_TZNAME_MAX = 3 unless _XPG6 is defined.
173+
* That is too small for real-world timezone abbreviations ("EDT", "CEST", ...).
174+
*/
175+
# if defined(__sun__) && _POSIX_TZNAME_MAX < 6
176+
# define MAX_ABBR_LEN 6
177+
# else
178+
# define MAX_ABBR_LEN _POSIX_TZNAME_MAX
179+
# endif
173180
#elif defined(TZNAME_MAX)
174181
# define MAX_ABBR_LEN TZNAME_MAX
175182
#else
@@ -2013,10 +2020,10 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain
20132020
in.errors->error_messages = NULL;
20142021

20152022
if (len > 0) {
2016-
while (isspace(*s) && s < e) {
2023+
while (isspace((unsigned char)*s) && s < e) {
20172024
s++;
20182025
}
2019-
while (isspace(*e) && e > s) {
2026+
while (isspace((unsigned char)*e) && e > s) {
20202027
e--;
20212028
}
20222029
}

ext/date/lib/timelib.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2015-2025 Derick Rethans
4+
* Copyright (c) 2015-2026 Derick Rethans
55
* Copyright (c) 2018,2021 MongoDB, Inc.
66
*
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -30,9 +30,9 @@
3030
# include "timelib_config.h"
3131
#endif
3232

33-
#define TIMELIB_VERSION 202214
34-
#define TIMELIB_EXTENDED_VERSION 20221401
35-
#define TIMELIB_ASCII_VERSION "2022.14"
33+
#define TIMELIB_VERSION 202215
34+
#define TIMELIB_EXTENDED_VERSION 20221501
35+
#define TIMELIB_ASCII_VERSION "2022.15"
3636

3737
#include <stdlib.h>
3838
#include <stdbool.h>

0 commit comments

Comments
 (0)