Display time based on locale instead of using fixed 24h format

pull/1960/head
Marcelo Schmidt 11 years ago
parent 99b206d816
commit 26fd849adb
  1. 2
      packages/rocketchat-livechat/app/client/views/message.coffee
  2. 12
      packages/rocketchat-livechat/client/views/app/livechatAppearance.js
  3. 2
      packages/rocketchat-ui-flextab/flex-tab/tabs/userInfo.coffee
  4. 4
      packages/rocketchat-ui-message/message/message.coffee

@ -4,7 +4,7 @@ Template.message.helpers
return 'own' if this.u?._id is Meteor.userId()
time: ->
return moment(this.ts).format('HH:mm')
return moment(this.ts).format('LT')
date: ->
return moment(this.ts).format('LL')

@ -18,7 +18,7 @@ Template.livechatAppearance.helpers({
u: {
username: 'guest'
},
time: moment(this.ts).format('HH:mm'),
time: moment(this.ts).format('LT'),
date: moment(this.ts).format('LL'),
body: 'Hello',
sequential: null
@ -28,7 +28,7 @@ Template.livechatAppearance.helpers({
u: {
username: 'rocketchat-agent'
},
time: moment(this.ts).format('HH:mm'),
time: moment(this.ts).format('LT'),
date: moment(this.ts).format('LL'),
body: 'Hey, what can I help you with?',
sequential: null
@ -38,7 +38,7 @@ Template.livechatAppearance.helpers({
u: {
username: 'guest'
},
time: moment(this.ts).format('HH:mm'),
time: moment(this.ts).format('LT'),
date: moment(this.ts).format('LL'),
body: 'I\'m looking for informations about your product.',
sequential: null
@ -48,7 +48,7 @@ Template.livechatAppearance.helpers({
u: {
username: 'rocketchat-agent'
},
time: moment(this.ts).format('HH:mm'),
time: moment(this.ts).format('LT'),
date: moment(this.ts).format('LL'),
body: 'Our product is open source, you can do what you want with it! =D',
sequential: null
@ -58,7 +58,7 @@ Template.livechatAppearance.helpers({
u: {
username: 'guest'
},
time: moment(this.ts).format('HH:mm'),
time: moment(this.ts).format('LT'),
date: moment(this.ts).format('LL'),
body: 'Yay, thanks. That\'s awesome.',
sequential: null
@ -68,7 +68,7 @@ Template.livechatAppearance.helpers({
u: {
username: 'rocketchat-agent'
},
time: moment(this.ts).format('HH:mm'),
time: moment(this.ts).format('LT'),
date: moment(this.ts).format('LL'),
body: 'You\'re welcome.',
sequential: null

@ -31,7 +31,7 @@ Template.userInfo.helpers
userTime: ->
if @utcOffset?
return Template.instance().now.get().utcOffset(@utcOffset).format('HH:mm')
return Template.instance().now.get().utcOffset(@utcOffset).format('LT')
canRemoveUser: ->
return RocketChat.authz.hasAllPermission('remove-user', Session.get('openedRoom'))

@ -14,7 +14,7 @@ Template.message.helpers
chatops: ->
return 'chatops-message' if this.u?.username is RocketChat.settings.get('Chatops_Username')
time: ->
return moment(this.ts).format('HH:mm')
return moment(this.ts).format('LT')
date: ->
return moment(this.ts).format('LL')
isTemp: ->
@ -32,7 +32,7 @@ Template.message.helpers
editTime: ->
if Template.instance().wasEdited
return moment(@editedAt).format('LL hh:mma') #TODO profile pref for 12hr/24hr clock?
return moment(@editedAt).format('LL LT') #TODO profile pref for 12hr/24hr clock?
editedBy: ->
return "" unless Template.instance().wasEdited
# try to return the username of the editor,

Loading…
Cancel
Save