[PHP8.1] RSS feed: Function strptime() is deprecated #1655

Closed
opened 2026-10-05 00:51:52 +02:00 by adam · 4 comments
Owner

This warning makes the export of an RSS feed impossible:
Deprecated: Function strptime() is deprecated in /.../include/functions_notification.inc.php on line 604

How to reproduce:
grafik

grafik

grafik

Expected:
have a valid RSS feed

Environment:
Piwigo 13.6.0
PHP8.1

This warning makes the export of an RSS feed impossible: `Deprecated: Function strptime() is deprecated in /.../include/functions_notification.inc.php on line 604` How to reproduce: ![grafik](https://user-images.githubusercontent.com/1645099/229267455-a944708b-5590-410e-bdf6-4757e477420e.png) ![grafik](https://user-images.githubusercontent.com/1645099/229267458-1e961c8d-b5e4-46e0-9ff6-ddd0d66d3546.png) ![grafik](https://user-images.githubusercontent.com/1645099/229267464-30262d2b-2759-4a6f-8c3a-b86c05033d04.png) Expected: have a valid RSS feed Environment: Piwigo 13.6.0 PHP8.1 <!-- github-sync-id:1650309176 -->
adam closed this issue 2026-10-05 00:51:52 +02:00
Author
Owner

hello
the strptime() function is deprecated since php 8.1
try replacing this with date_parse_from_format

604 $exploded_date = date_parse_from_format($date, '%Y-%m-%d %H:%M:%S');
607
612 if (!function_exists('date_parse_from_format'))
614 function date_parse_from_format($date, $fmt)
617 die('Invalid date_parse_from_format format '.$fmt);

notif

hello the strptime() function is deprecated since php 8.1 try replacing this with date_parse_from_format `604 $exploded_date = date_parse_from_format($date, '%Y-%m-%d %H:%M:%S');` `607` `612 if (!function_exists('date_parse_from_format'))` `614 function date_parse_from_format($date, $fmt)` `617 die('Invalid date_parse_from_format format '.$fmt);` ![notif](https://user-images.githubusercontent.com/36087587/230661432-63f2b311-4e69-4385-8b2e-dc00bbda216d.jpg) <!-- github-comment-id:1493062933 -->
Author
Owner

Hi @plegall
I propose it from version 14 🙏

Hi @plegall I propose it from version 14 🙏 <!-- github-comment-id:1545320433 -->
Author
Owner

@klaoun I made a simpler fix

@klaoun I made a simpler fix <!-- github-comment-id:1748920131 -->
Author
Owner

@plegall ok approved fix

@plegall ok approved fix <!-- github-comment-id:1749855273 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1655