From c2c51360dd0863cb93ee7facf2ace460a8290ed2 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 31 Dec 2015 10:04:12 +0200 Subject: [PATCH] Fixes for #584 --- app/Models/Account.php | 8 +++++++- app/Ninja/Presenters/TaskPresenter.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Models/Account.php b/app/Models/Account.php index d3d71f1760..3f994e44ec 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -290,7 +290,13 @@ class Account extends Eloquent public function getCustomDateTimeFormat() { - return $this->getCustomDateFormat() . ' ' . $this->getCustomTimeFormat(); + $format = $this->datetime_format ? $this->datetime_format->format : DEFAULT_DATETIME_FORMAT; + + if ($this->military_time) { + $format = str_replace('g:i a', 'H:i', $format); + } + + return $format; } public function getGatewayByType($type = PAYMENT_TYPE_ANY) diff --git a/app/Ninja/Presenters/TaskPresenter.php b/app/Ninja/Presenters/TaskPresenter.php index eafc2d71fa..09b860a1a2 100644 --- a/app/Ninja/Presenters/TaskPresenter.php +++ b/app/Ninja/Presenters/TaskPresenter.php @@ -31,7 +31,7 @@ class TaskPresenter extends Presenter { $start = $account->formatDateTime("@{$start}"); $end = $account->formatTime("@{$end}"); - $times[] = "###{$start} - {$end}"; + $times[] = "### {$start} - {$end}"; } return implode("\n", $times);