{"id":87,"date":"2008-09-15T00:07:29","date_gmt":"2008-09-14T21:07:29","guid":{"rendered":"http:\/\/www.held.org.il\/blog\/?p=87"},"modified":"2008-09-15T00:07:29","modified_gmt":"2008-09-14T21:07:29","slug":"gallery2-show-photo-date-time","status":"publish","type":"post","link":"http:\/\/www.held.org.il\/blog\/2008\/09\/gallery2-show-photo-date-time\/","title":{"rendered":"Gallery2: displaying photo date &amp; time"},"content":{"rendered":"<p>When viewing an album using <a title=\"Gallery official webpage\" href=\"http:\/\/gallery.menalto.com\/\">Gallery2<\/a>, each photo has a \"Date: dd\/mm\/yy\" line underneath.<\/p>\n<p>The EXIF plugin can automatically detect the date &amp; time the photo was taken on, but only the date is displayed by default. I find the time also important, so I wanted it displayed as well, in the \"dd\/mm\/yy, HH:MM\" format.<\/p>\n<p>Unfortunately there's no nice GUI for setting this. It can be done, though, by modifying a line in the file <strong><em>\/usr\/share\/gallery2\/modules\/core\/templates\/blocks\/ItemInfo.tpl<\/em><\/strong>:<\/p>\n<p>From:<\/p>\n<blockquote><p>{capture name=childTimestamp}{g-&gt;date timestamp=$item.originationTimestamp}{\/capture}<\/p><\/blockquote>\n<p>To:<\/p>\n<blockquote><p>{capture name=childTimestamp}{g-&gt;date timestamp=$item.originationTimestamp <strong>format=\"%D, %R\"<\/strong>}{\/capture}<\/p><\/blockquote>\n<p>The date-template format (\"%D\" \"%R\" etc) is explained in PHP's <a title=\"strftime man page\" href=\"http:\/\/www.php.net\/strftime\">strftime() help page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When viewing an album using Gallery2, each photo has a &#8220;Date: dd\/mm\/yy&#8221; line underneath. The EXIF plugin can automatically detect the date &amp; time the photo was taken on, but only the date is displayed by default. I find the time also important, so I wanted it displayed as well, in the &#8220;dd\/mm\/yy, HH:MM&#8221; format. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"tags":[198,46,117],"_links":{"self":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts\/87"}],"collection":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":0,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}