[21203] Improvement: use timezone rather than offset 4746:5203

Sigurd Nes <[email protected]> Wed, 14 Apr 2010 19:42:17 +0000
Newsgroups gmane.comp.web.phpgroupware.cvs
Message-ID <[email protected]>
Revision: 21203
          http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=21203
Author:   sigurdne
Date:     2010-04-14 19:42:17 +0000 (Wed, 14 Apr 2010)
Log Message:
-----------
Improvement: use timezone rather than offset 4746:5203

Modified Paths:
--------------
    people/sigurdne/modules/preferences/trunk/inc/hook_settings.inc.php

Modified: people/sigurdne/modules/preferences/trunk/inc/hook_settings.inc.php
===================================================================
--- people/sigurdne/modules/preferences/trunk/inc/hook_settings.inc.php	2010-04-14 19:40:42 UTC (rev 21202)
+++ people/sigurdne/modules/preferences/trunk/inc/hook_settings.inc.php	2010-04-14 19:42:17 UTC (rev 21203)
@@ -31,6 +31,8 @@
 	create_select_box('Theme (colors/fonts) Selection','theme',$_themes,
 		'A theme defines the colors and fonts used by the template.');
 
+
+/*
 	$format = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
 	$format = ($format ? $format : 'Y/m/d') . ', ';
 	if ($GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] == '12')
@@ -49,6 +51,17 @@
 	create_select_box('Time zone offset','tz_offset',$tz_offset,
 		'How many hours are you in front or after the timezone of the server.<br>If you are in the same time zone as the server select 0 hours, else select your locale date and time.');
 
+*/
+	$timezone_identifiers = DateTimeZone::listIdentifiers();
+
+	$timezone = array();
+	foreach($timezone_identifiers as $identifier)
+	{
+		$timezone[$identifier] = $identifier;
+	}
+	create_select_box('Time zone','timezone',$timezone,
+		'A time zone is a region of the earth that has uniform standard time, usually referred to as the local time. By convention, time zones compute their local time as an offset from UTC');
+
 	$date_formats = array
 	(
 		'm/d/Y' => 'm/d/Y',