How to change date??

How to change date??

by adel Ghazikhani -
Number of replies: 7

Hi

I live in Iran and the date that we use in Iran is different from your date in U.S.A .

I want to know that how can I change the dates displayed.

There is a similar date for every date in your calendar for example:

18 march for us is 28 esfand.

how can I convert this date to the date I want.

Average of ratings: -
In reply to adel Ghazikhani

Re: How to change date??

by Thomas Robb -
There is a module at the URL below which could be used to convert between the Gregorian and Jalali calendars:

http://www.farsiweb.info/jalali/jalali.phps

It will perform conversions in both directions.

This would have to be incorporated into Moodle somewhere so that it could be called upon when needed.
In reply to Thomas Robb

Re: How to change date??

by adel Ghazikhani -

Thank you very much.

Dont you have any idea where this module should be incorporated?

How dose Moodle show the dates?

Thankyou

In reply to adel Ghazikhani

Re: How to change date??

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
All dates are printed with the userdate() function in lib/moodlelib.php, so that where you should start.  The argument (and value stored everywhere in the database) is the number of seconds since 12:00am 1st January 1970, Greenwich Mean Time.  userdate performs the (slightly complicated) conversion of this into a time that makes sense to the current user.

Another country that needs custom dates is Thailand.
In reply to Martin Dougiamas

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: How to change date??

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It would be much easier for us to handle these changes if you could create a Patch file which shows just the changes (See Development:How_to_create_a_patch).

Then create a new issue in the tracker (http://tracker.moodle.org) summarising this issue and attaching your patch. Thank you.

(You might also like to read the Minor Development section of Development:Overview.)