Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ PHP NEWS
needing to be present beforehand. (ndossche)
. Added `clamp()`. (kylekatarnls, thinkverse)

- Date:
. Update timelib to 2022.16. (Derick)

- DOM:
. Removed LIBXML_XINCLUDE from valid options for XMLDocument,
as it was a no-op. (ndossche)
Expand Down
13 changes: 10 additions & 3 deletions ext/date/lib/parse_date.re
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,14 @@ static const timelib_tz_lookup_table timelib_timezone_utc[] = {
};

#if defined(_POSIX_TZNAME_MAX)
# define MAX_ABBR_LEN _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
#elif defined(TZNAME_MAX)
# define MAX_ABBR_LEN TZNAME_MAX
#else
Expand Down Expand Up @@ -2013,10 +2020,10 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain
in.errors->error_messages = NULL;

if (len > 0) {
while (isspace(*s) && s < e) {
while (isspace((unsigned char)*s) && s < e) {
s++;
}
while (isspace(*e) && e > s) {
while (isspace((unsigned char)*e) && e > s) {
e--;
}
}
Expand Down
8 changes: 4 additions & 4 deletions ext/date/lib/timelib.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2025 Derick Rethans
* Copyright (c) 2015-2026 Derick Rethans
* Copyright (c) 2018,2021 MongoDB, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -30,9 +30,9 @@
# include "timelib_config.h"
#endif

#define TIMELIB_VERSION 202214
#define TIMELIB_EXTENDED_VERSION 20221401
#define TIMELIB_ASCII_VERSION "2022.14"
#define TIMELIB_VERSION 202215
#define TIMELIB_EXTENDED_VERSION 20221501
#define TIMELIB_ASCII_VERSION "2022.15"

#include <stdlib.h>
#include <stdbool.h>
Expand Down
Loading