Do we have the option to edit datetime formats?

Do we have the option to edit datetime formats?

av Pegasus Roe -
Antall svar: 4
Hi
I can't find any place to setup datetime formats in the langconfig.php file except directly editting it.
Please help!

My system settings:
  • Windows 2000 Server
  • Moodle 1.6.1
  • locale: zh_tw_utf8

Thanks.
Gjennomsnittlig vurdering: -
Som svar til Pegasus Roe

Re: Do we have the option to edit datetime formats?

av Helen Foster -
Bilde av Core developers Bilde av Documentation writers Bilde av Moodle HQ Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers Bilde av Translators
Hi Pegasus,

Please check the locale and timezone variables in the Interface section of Administration >> Configuration >> Variables.
Som svar til Helen Foster

Re: Do we have the option to edit datetime formats?

av Pegasus Roe -
I suppose we are talking about Moodle 1.6, am I right?

I have already gone to the Interface section and made the necessary changes to those locale and timezone settings, but nothing happens to the datetime format on my Moodle site, which pushed me into editing the 'langconfig.php' file directly, and this time it works (mostly).

Have I done anything wrong?
Som svar til Pegasus Roe

Re: Do we have the option to edit datetime formats?

av Joseph Rézeau -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers Bilde av Translators

Hi Pegasus,

It would help other moodlers if you stated exactly a) what kind of datetime format you wanted to display (12 hour vs 24 hour clock ? or something else) b) how you achieved this by editing the langconfig.php file (what changes did you make?).

Thanks,

Joseph

Som svar til Joseph Rézeau

Re: Do we have the option to edit datetime formats?

av Pegasus Roe -
Hi Joseph

I was just wondering why we don't have the option to set the datetime format as we wish (through Administration panels or 'Edit strings' page).
For example:
  • English users would say:
    Tuesday, 7 November 2006, 06:07 AM
  • But we would say:
    95/11/07 06:07 AM 星期二

    Note: 95 is Taiwan year, which is calculated from 2006 - 1911 = 95, 星期二 is Tuesday in Chinese.

The following images are captured from http://moodle.club.tw/moodle, which is a moodle site dedicated to Moodle localization in Taiwan. The datetime format shown below is still in English, which is supposed to be in Chinese(Taiwan) format.

recent eventscalendar
forum


The following are captured from my moodle site, whose datetime format is affected by the 'langconfig.php' file I edited manually earlier.

latest newsrecent activities
forum

The following is my 'lanconfig.php'

<?php
$string['locale'] = "zh_TW.UTF-8";
$string['localewin'] = "Chinese_Taiwan.950";
$string['localewincharset'] = "CP950";
$string['oldcharset'] = 'BIG5';
$string['thischarset'] = "UTF-8";
$string['thislanguage'] = "正體中文";
$string['strftimedateshort'] = '%%m/%%d';
$string['strftimedatetime'] = '%%x %%H:%%M';
$string['strftimedaydate'] = '%%A %%x';
$string['strftimedaydatetime'] = '%%A %%x (%%H:%%M)';
$string['strftimedayshort'] = '%%A %%m/%%d';
$string['strftimedaytime'] = '%%a %%H:%%M';
$string['strftimemonthyear'] = '%%Y/%%m';
$string['strftimerecent'] = '%%x %%H:%%M';
$string['strftimerecentfull'] = '%%a %%x %%H:%%M';
$string['strftimetime'] = '%%H:%%M';
?>

Pegasus