From f6926f16700bbbf98fe5c124fd61273a9f967650 Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Tue, 15 Mar 2016 13:28:39 +0100 Subject: [PATCH] Replacing date by strftime This allows date translation --- php/Modules/Album.php | 2 +- php/Modules/Photo.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/php/Modules/Album.php b/php/Modules/Album.php index feb97ed..4460a5c 100644 --- a/php/Modules/Album.php +++ b/php/Modules/Album.php @@ -71,7 +71,7 @@ final class Album { if (isset($data['downloadable'])) $album['downloadable'] = $data['downloadable']; // Parse date - $album['sysdate'] = date('F Y', $data['sysstamp']); + $album['sysdate'] = strftime('%B %Y', $data['sysstamp']); // Parse password $album['password'] = ($data['password']=='' ? '0' : '1'); diff --git a/php/Modules/Photo.php b/php/Modules/Photo.php index c7d20f3..ef79a95 100755 --- a/php/Modules/Photo.php +++ b/php/Modules/Photo.php @@ -614,13 +614,13 @@ final class Photo { // Use takestamp $photo['cameraDate'] = '1'; - $photo['sysdate'] = date('d F Y', $data['takestamp']); + $photo['sysdate'] = strftime('%d %B %Y', $data['takestamp']); } else { // Use sysstamp from the id $photo['cameraDate'] = '0'; - $photo['sysdate'] = date('d F Y', substr($data['id'], 0, -4)); + $photo['sysdate'] = strftime('%d %B %Y', substr($data['id'], 0, -4)); } @@ -658,8 +658,8 @@ final class Photo { } // Parse photo - $photo['sysdate'] = date('d M. Y', substr($photo['id'], 0, -4)); - if (strlen($photo['takestamp'])>1) $photo['takedate'] = date('d M. Y', $photo['takestamp']); + $photo['sysdate'] = strftime('%d %b. %Y', substr($photo['id'], 0, -4)); + if (strlen($photo['takestamp'])>1) $photo['takedate'] = strftime('%d %b. %Y', $photo['takestamp']); // Parse medium if ($photo['medium']==='1') $photo['medium'] = LYCHEE_URL_UPLOADS_MEDIUM . $photo['url'];