Author Topic: Date Time Format  (Read 2703 times)

waldoj

  • Newbie
  • *
  • Posts: 3
Date Time Format
« on: August 22, 2007, 09:06:41 pm »
How would I change the time format from US to European?
 
ie from the current  m/d/y to d/m/y

Many thanks.

calemadmin

  • Administrator
  • Calem Hero
  • *****
  • Posts: 300
    • http://www.calemeam.com
Date Time Format
« Reply #1 on: August 23, 2007, 03:16:52 pm »
The steps to change the date and time format:

1. edit CalemEAM/client/conf/CalemConfCustom.js, add the following lines:

// European date and time
I18nMsg["formatDateShort"] = "d/MM/yy";
I18nMsg["formatTimeShort"] = "H:mm";

CalemConf['text_formatter']['date'] = {
      read: ['EEE, ', I18nMsg['formatDateShort']].join(''),
      edit: I18nMsg['formatDateShort'],
      server: 'yyyy-MM-dd'
   };
   
CalemConf['text_formatter']['time'] = {
      read: I18nMsg['formatTimeShort'],
      edit: I18nMsg['formatTimeShort'],
      server: 'HH:mm:ss',
      parse: {ampm_reqd: false, pmMax: 7}
   };

CalemConf['text_formatter']['datetime']= {
      read: ['EEE, ', I18nMsg['formatDateShort'], ' ', I18nMsg['formatTimeShort']].join(''),
      server: 'yyyy-MM-dd HH:mm:ss'
   };

2. Go to CalemEAM/bin, run the following command:
deploy build

This command will include the changes in CalemConfCustom.js in released files. Launch CalemEAM from a browser (or refresh a CalemEAM browser session if any), the date/time format should be changed.
Calem Community Forum Admin

waldoj

  • Newbie
  • *
  • Posts: 3
Date Time Format
« Reply #2 on: August 23, 2007, 05:21:17 pm »
Great Stuff thanks!

I just tweaked the formatTimeShort to hh:mm for the full 24hr effect

Again many thanks.