Skip to content

Commit e208cd8

Browse files
committed
Upgrade timelib to 2022.16
1 parent 2670c86 commit e208cd8

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.3.31
44

5+
- Date:
6+
. Update timelib to 2022.15. (Derick)
57

68
15 Jan 2026, PHP 8.3.30
79

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)