kitodo-presentation icon indicating copy to clipboard operation
kitodo-presentation copied to clipboard

[MAINTENANCE] Replace strftime in CalendarController

Open stweil opened this issue 10 months ago • 2 comments

The function strftime "has been DEPRECATED as of PHP 8.1.0. Relying on this function is highly discouraged." See the official documentation for details.

stweil avatar Mar 04 '25 16:03 stweil

The calendar view currently fails with a runtime "Oops" because of its use of strftime when the default debug settings are enabled in the TYPO3 backend. This setting in config/system/additional.php can be used to work around this problem:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['exceptionalErrors'] = 2048;

stweil avatar Mar 04 '25 16:03 stweil

I wonder whether the formatting of the year with two digits like in $title = strftime('%x', strtotime($title)); is reasonable for historic books and journals which typically are older than our current century and which sometimes cover more than a single century.

stweil avatar Mar 04 '25 16:03 stweil