From b0252c9aa91ff9382600cd0cb66b69530f080941 Mon Sep 17 00:00:00 2001
From: Elias Nahum <nahumhbl@gmail.com>
Date: Thu, 11 Feb 2016 16:29:52 -0300
Subject: Fix duplicate am/pm on last password update

---
 web/react/components/user_settings/user_settings_security.jsx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'web/react/components/user_settings/user_settings_security.jsx')

diff --git a/web/react/components/user_settings/user_settings_security.jsx b/web/react/components/user_settings/user_settings_security.jsx
index 5693047c2..166f5ec45 100644
--- a/web/react/components/user_settings/user_settings_security.jsx
+++ b/web/react/components/user_settings/user_settings_security.jsx
@@ -11,6 +11,7 @@ import TeamStore from '../../stores/team_store.jsx';
 
 import * as Client from '../../utils/client.jsx';
 import * as AsyncClient from '../../utils/async_client.jsx';
+import * as Utils from '../../utils/utils.jsx';
 import Constants from '../../utils/constants.jsx';
 
 import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'mm-intl';
@@ -216,15 +217,12 @@ class SecurityTab extends React.Component {
 
         var describe;
         var d = new Date(this.props.user.last_password_update);
-        var timeOfDay = ' am';
-        if (d.getHours() >= 12) {
-            timeOfDay = ' pm';
-        }
 
         const locale = global.window.mm_locale;
+        const hours12 = !Utils.useMilitaryTime();
         describe = formatMessage(holders.lastUpdated, {
             date: d.toLocaleDateString(locale, {month: 'short', day: '2-digit', year: 'numeric'}),
-            time: d.toLocaleTimeString(locale, {hours12: true, hour: '2-digit', minute: '2-digit'}) + timeOfDay
+            time: d.toLocaleTimeString(locale, {hour12: hours12, hour: '2-digit', minute: '2-digit'})
         });
 
         updateSectionStatus = function updateSection() {
-- 
cgit v1.2.3-1-g7c22


From ae8c67365de589238066237c667f5132ced13087 Mon Sep 17 00:00:00 2001
From: Elias Nahum <nahumhbl@gmail.com>
Date: Thu, 11 Feb 2016 16:46:46 -0300
Subject: eslint no-shadow resolved

---
 web/react/components/user_settings/user_settings_security.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/components/user_settings/user_settings_security.jsx')

diff --git a/web/react/components/user_settings/user_settings_security.jsx b/web/react/components/user_settings/user_settings_security.jsx
index 166f5ec45..53d79906f 100644
--- a/web/react/components/user_settings/user_settings_security.jsx
+++ b/web/react/components/user_settings/user_settings_security.jsx
@@ -219,7 +219,7 @@ class SecurityTab extends React.Component {
         var d = new Date(this.props.user.last_password_update);
 
         const locale = global.window.mm_locale;
-        const hours12 = !Utils.useMilitaryTime();
+        const hours12 = !Utils.isMilitaryTime();
         describe = formatMessage(holders.lastUpdated, {
             date: d.toLocaleDateString(locale, {month: 'short', day: '2-digit', year: 'numeric'}),
             time: d.toLocaleTimeString(locale, {hour12: hours12, hour: '2-digit', minute: '2-digit'})
-- 
cgit v1.2.3-1-g7c22

