Replacing date by strftime

This allows date translation
This commit is contained in:
Quentin Ligier 2016-03-15 12:47:01 +01:00
parent c0c924fc13
commit cfe470283d
2 changed files with 5 additions and 5 deletions

View File

@ -76,7 +76,7 @@ class Album extends Module {
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

@ -631,13 +631,13 @@ class Photo extends Module {
# 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));
}
@ -665,8 +665,8 @@ class Photo extends Module {
$photo = $photos->fetch_assoc();
# 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'];