summaryrefslogtreecommitdiff
path: root/modules/gallery/config/locale.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/config/locale.php')
-rw-r--r--modules/gallery/config/locale.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/gallery/config/locale.php b/modules/gallery/config/locale.php
index 0509e45f..bce7fb49 100644
--- a/modules/gallery/config/locale.php
+++ b/modules/gallery/config/locale.php
@@ -29,13 +29,14 @@
$config['language'] = array('en_US', 'English_United States');
/**
- * Locale timezone. Defaults to use the server timezone.
+ * Locale timezone. Set in 'Advanced' settings, falling back to the server's zone.
* @see http://php.net/timezones
*/
-$config['timezone'] = ini_get('date.timezone');
-if (empty($config['timezone'])) {
- // This is a required field. Pick something as a default.
- $config['timezone'] = "America/Los_Angeles";
+if (file_exists(VARPATH . "database.php")) {
+ $config['timezone'] = module::get_var("gallery", "timezone", date_default_timezone_get());
+} else {
+ // Gallery3 is not installed yet -- don't make module::get_var() calls.
+ $config['timezone'] = date_default_timezone_get();
}
// i18n settings