use PHP version 8.1.x on your site
create (or change) a form calendar field by either removing the optional translateformat parameter (in that case it default to false, or setting it to false > translateformat="false"
No deprecated message
Deprecated: Function strftime() is deprecated in [root]/libraries/src/Form/Field/CalendarField.php on line 273
J4.2.6
PHP 8.1.13
| Labels |
Removed:
?
|
||
| Labels |
Added:
No Code Attached Yet
|
||
Closing as duplicate.
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-12-16 11:45:18 |
| Closed_By | ⇒ | chmst |
@Ruud68 Just saw this from the linked issue. In your case, if you use you a Calendar form field translateformat="false", you can prevent warning by adding filterformat attribute to the field. The filterformat must provide equivalent format with the format defined in format attribute of the field. For example
<field
name="test"
type="calendar"
label="Test Calendar"
format="%Y-%m-%d %H:%M:%S"
filterformat="Y-m-d H:i:s"
showtime="true"
filter="user_utc"
/>Hope this helps.
Thanks Tuan for following up
#38276