Date formatting: Code or Template?
Instead of date() you should use format_date() instead per Drupal.

https://api.drupal.org/api/drupal/includes%21common.inc/function/format_date/7.x

format_date takes various settings and user config into account when formatting the date, whereas just date is a php function, and thus, will not. You can also pass it a custom date format name.

While you can use format_date() at the template level, usually it is best to do it in a preprocess function and pass it along to the template. If you have a module that is supplying variables to a template, supply them upfront.

Variables should be print-ready for the user, with the option of overriding later (extending or preprocessing at the theme level, etc).