Merge pull request #484 from qligier/develop

Replacing date by strftime
This commit is contained in:
Tobias Reich 2016-03-15 13:35:44 +01:00
commit 54b7fc57c0
2 changed files with 5 additions and 5 deletions

View File

@ -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');

View File

@ -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'];