summaryrefslogtreecommitdiffstats
path: root/web/react/components/user_settings/user_settings_security.jsx
diff options
context:
space:
mode:
authorAsaad Mahmood <asaad@spinpunch.com>2016-02-12 20:19:07 +0500
committerAsaad Mahmood <asaad@spinpunch.com>2016-02-12 20:19:07 +0500
commit7bea418a6575d8d02c1f3eb9f3dbb99fe4d90b0a (patch)
tree069222c906cbf56feb003c806f60230cdbf81844 /web/react/components/user_settings/user_settings_security.jsx
parent6bf1203581a295e82116c23bc4fe2d9d29362cf4 (diff)
parent6cb4f82ee5a17cd1d32ae19c266b78c2cfd604e6 (diff)
downloadchat-7bea418a6575d8d02c1f3eb9f3dbb99fe4d90b0a.tar.gz
chat-7bea418a6575d8d02c1f3eb9f3dbb99fe4d90b0a.tar.bz2
chat-7bea418a6575d8d02c1f3eb9f3dbb99fe4d90b0a.zip
Merge branch 'master' of https://github.com/mattermost/platform into ui-fixes
Diffstat (limited to 'web/react/components/user_settings/user_settings_security.jsx')
-rw-r--r--web/react/components/user_settings/user_settings_security.jsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/web/react/components/user_settings/user_settings_security.jsx b/web/react/components/user_settings/user_settings_security.jsx
index 5693047c2..53d79906f 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.isMilitaryTime();
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() {