1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 15:57:01 +02:00

Add PR #291 - remove php version check for strftime call in WireDateTime

This commit is contained in:
tobaco
2024-08-09 14:20:15 -04:00
committed by Ryan Cramer
parent 6e93844c19
commit 1fdc61dc41
3 changed files with 3 additions and 3 deletions

View File

@@ -421,7 +421,7 @@ class WireDateTime extends Wire {
$value = $this->relativeTimeStr($ts, 1, false);
} else if($format == 'ts') {
$value = $ts;
} else if(strpos($format, '%') !== false && version_compare(PHP_VERSION, '8.1.0', '<')) {
} else if(strpos($format, '%') !== false) {
$value = $this->strftime($format, $ts);
} else {
$value = date($format, $ts);