Skip to content

Commit 3565411

Browse files
committed
ext/intl: dateformatter settimezone changes on success, returning true
like setcalendar.
1 parent 6a71153 commit 3565411

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ PHP 8.3 UPGRADE NOTES
7676
- Dom:
7777
. Changed DOMCharacterData::appendData() tentative return type to true.
7878

79+
- Intl:
80+
. IntlDateformatter::setTimeZone returns true on sucess.
81+
7982
- MBString:
8083
. mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional
8184
casing rules for the Greek letter sigma. For mb_convert_case, conditional

ext/intl/dateformat/dateformat.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function getTimeZone(): IntlTimeZone|false {}
136136
* @tentative-return-type
137137
* @alias datefmt_set_timezone
138138
*/
139-
public function setTimeZone($timezone): ?bool {} // TODO return true on success
139+
public function setTimeZone($timezone): bool {}
140140

141141
/**
142142
* @tentative-return-type

ext/intl/dateformat/dateformat_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/intl/dateformat/dateformat_attrcpp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ U_CFUNC PHP_FUNCTION(datefmt_set_timezone)
101101
}
102102

103103
fetch_datefmt(dfo)->adoptTimeZone(timezone);
104+
105+
RETURN_TRUE;
104106
}
105107

106108
/* {{{ Get formatter calendar type. */

0 commit comments

Comments
 (0)