From 2e638738bbeed9de01bdc3bf50ea908d1ef70f55 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 14 May 2015 17:22:04 -0500
Subject: [PATCH] oops: Fix backwards strftime() format codes

---
 include/class.format.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/class.format.php b/include/class.format.php
index d824a4e38..30e5a0197 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -502,7 +502,7 @@ class Format {
         return self::__formatDate($timestamp,
             $format ?: $cfg->getTimeFormat(), $fromDb,
             IDF_NONE, IDF_SHORT,
-            '%x', $timezone ?: $cfg->getTimezone(), $user);
+            '%X', $timezone ?: $cfg->getTimezone(), $user);
     }
 
     function date($timestamp, $fromDb=true, $format=false, $timezone=false, $user=false) {
@@ -511,7 +511,7 @@ class Format {
         return self::__formatDate($timestamp,
             $format ?: $cfg->getDateFormat(), $fromDb,
             IDF_SHORT, IDF_NONE,
-            '%X', $timezone ?: $cfg->getTimezone(), $user);
+            '%x', $timezone ?: $cfg->getTimezone(), $user);
     }
 
     function datetime($timestamp, $fromDb=true, $timezone=false, $user=false) {
@@ -520,7 +520,7 @@ class Format {
         return self::__formatDate($timestamp,
                 $cfg->getDateTimeFormat(), $fromDb,
                 IDF_SHORT, IDF_SHORT,
-                '%X %x', $timezone ?: $cfg->getTimezone(), $user);
+                '%x %X', $timezone ?: $cfg->getTimezone(), $user);
     }
 
     function daydatetime($timestamp, $fromDb=true, $timezone=false, $user=false) {
@@ -529,7 +529,7 @@ class Format {
         return self::__formatDate($timestamp,
                 $cfg->getDayDateTimeFormat(), $fromDb,
                 IDF_FULL, IDF_SHORT,
-                '%X %x', $timezone ?: $cfg->getTimezone(), $user);
+                '%x %X', $timezone ?: $cfg->getTimezone(), $user);
     }
 
     function getStrftimeFormat($format) {
-- 
GitLab