Note: You are currently viewing documentation for Moodle 2.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Location.

Location: Difference between revisions

From MoodleDocs

(Additional tools may be found elsewhere in the admin settings)

(Recommend that people do not use the UTC default timezones)
 
(9 intermediate revisions by one other user not shown)
Line 7: Line 7:
This sets the default timezone for date display.
This sets the default timezone for date display.


Be sure to first download and/or update the complete list of timezones from ''Site administration > Location > Update timezones''.  An out-of-the-box new installation of Moodle has only a few UTC time zone settings in this list. If you see only those, first update the list.
"Server's local time" here will make Moodle default to the server timezone as defined by the “Default timezone” setting in PHP.  You can view this in ''Site administration > Server > PHP Info > Date > Default timezone.'' (When this term appears in the user profile it means something slightly different. See the next setting for more.)


Is it '''recommended''' that you select a named timezone specific to your region (e.g. America/New_York) instead of a UTC setting if one is available. These settings are aware of [[https://en.wikipedia.org/wiki/Daylight_saving_time local time zone shifts]] such as Summer Time or Daylight Savings Time while UTC is not.
If you want to explicitly set a Timezone in Moodle instead of relying on the server one, please do not choose one of the UTC time zone settings in this list that come with a default Moodle installation. It is recommended that you select a named timezone specific to your Area and Location (e.g. America/New_York) instead of a UTC setting if one is available, unless you have a very specific reason not to. Using the UTC settings will cause Scheduled tasks to behave unexpectedly, and in addition, daylight savings will never be applied


"Server's local time" here will make Moodle default to the server timezone as defined by the “Default timezone” setting in PHP.
To get or update the complete list of timezones from ''Site administration > Location > Update timezones'' before setting this.  


(When this term appears in the user profile it means something slightly different. See the next setting for more.)
Such settings are preferred to UTC settings because they aware of [[https://en.wikipedia.org/wiki/Daylight_saving_time local time zone shifts]] such as Summer Time or Daylight Savings Time while UTC is not.


====Force default timezone====
====Force default timezone====
Pull down menu to force the user to be in a specific timezone or allow users to individually select their timezone.


This is off by default because when new users are created they will inherit the system default anyway, but are allowed to change it to another location if the are in another time zone or traveling, for instance.
Pull down the menu to force the user to be in a specific timezone or allow users to individually select their timezone.


Note: It is important to understand that setting "Server's local time" in a '''User profile''' ''> Timezone'' means whatever is set in the Moodle default timezone. So if the Moodle site default timezone is set, for example, to America/Montreal, the user will not see that in their profile, but will see "Server's local time" instead, but it means America/Montreal.  
When you allow the ''User's can set their own time zone'' setting, users will see this in their own profile in Timezone as  "Server's local time," which means the Moodle default timezone. So if the Moodle default timezone is set, for example, to America/Montreal, the user will not see America/Montreal that in their profile, but will see "Server's local time" instead, but it means America/Montreal.


If you do force a timezone for all users, then they will see an explicit timezone instead such as America/Montreal, and will not be able to change it.
If you do force a particular time zone, the users will see the explicit name of the time zone in their Profile > Timezone and will be not be able to change it.


====Default country====
====Default country====
Line 46: Line 45:
If the update is completed with success, Moodle will inform you how many entries were updated and which location was used as a source.
If the update is completed with success, Moodle will inform you how many entries were updated and which location was used as a source.


This naming convention on the list of Area/Location is based on the IANA Time Zone standard: see [[https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones here for more details]].  
This naming convention on the list of Area/Location is based on the IANA Time Zone standard: see [https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones here for more details].  


Typically, there will be one major city or location chosen to represent the time zone. Countries are not used. So you will need to pick the representative city or location for the time zone you wish Moodle to use.
Typically, there will be one major city or location chosen to represent the time zone. Countries are not used. So you will need to pick the representative city or location for the time zone you wish Moodle to use.

Latest revision as of 08:30, 14 August 2015

Location settings

An administrator can change the following location settings in Administration > Site administration > Location > Location settings.

Default timezone

This sets the default timezone for date display.

"Server's local time" here will make Moodle default to the server timezone as defined by the “Default timezone” setting in PHP. You can view this in Site administration > Server > PHP Info > Date > Default timezone. (When this term appears in the user profile it means something slightly different. See the next setting for more.)

If you want to explicitly set a Timezone in Moodle instead of relying on the server one, please do not choose one of the UTC time zone settings in this list that come with a default Moodle installation. It is recommended that you select a named timezone specific to your Area and Location (e.g. America/New_York) instead of a UTC setting if one is available, unless you have a very specific reason not to. Using the UTC settings will cause Scheduled tasks to behave unexpectedly, and in addition, daylight savings will never be applied

To get or update the complete list of timezones from Site administration > Location > Update timezones before setting this.

Such settings are preferred to UTC settings because they aware of [local time zone shifts] such as Summer Time or Daylight Savings Time while UTC is not.

Force default timezone

Pull down the menu to force the user to be in a specific timezone or allow users to individually select their timezone.

When you allow the User's can set their own time zone setting, users will see this in their own profile in Timezone as "Server's local time," which means the Moodle default timezone. So if the Moodle default timezone is set, for example, to America/Montreal, the user will not see America/Montreal that in their profile, but will see "Server's local time" instead, but it means America/Montreal.

If you do force a particular time zone, the users will see the explicit name of the time zone in their Profile > Timezone and will be not be able to change it.

Default country

Select the country to appear by default on a new user account page form.

IP address lookup

GeoIP City data file

Location of GeoIP City binary data file. This is a non-invasive way to determine geographical and other information about Internet visitors in real-time. This file is not part of Moodle distribution and must be obtained separately from MaxMind. There is a GeoIPLite version for free.

Google Maps API key

Google Maps for IP address lookup visualization key. The Google Maps API lets you embed Google Maps with JavaScript. This is free.

NOTE: There is no longer support for Google maps API V2 as it has been deprecated since 2010. V3 is now used. See here for details: https://developers.google.com/maps/documentation/javascript/tutorial#api_key

After updating the information in this section, IP's that are displayed as a link, such as in reports, when clicked will open new window with a Google Map indicating the location of the IP, if found and if not a private address.

Update timezones

The update timezones page Site administration > Location > Update timezones provides administrators with the option to update their local database with new information about world timezones.

This is important because of daylight saving changes that many countries use. You should generally use these regional location settings in preference to UTC unless you have a very specific reason to use UTC instead.

If the update is completed with success, Moodle will inform you how many entries were updated and which location was used as a source.

This naming convention on the list of Area/Location is based on the IANA Time Zone standard: see here for more details.

Typically, there will be one major city or location chosen to represent the time zone. Countries are not used. So you will need to pick the representative city or location for the time zone you wish Moodle to use.

For example, the following are the standard time zones in the continental U.S.:

  • America/New_York = Eastern Time
  • America/Chicago = Central Time
  • America/Denver = Mountain Time
  • America/Los_Angeles = Pacific Time

However, if you live in the state of Arizona, which does not observe Daylight Savings Time, you should choose America/Phoenix instead of America/Denver in order to properly observer the time change twice a year. Likewise for other exceptional areas in some states like Indiana, which have local time zone changes.

See also