$use_signature = getPref($data_dir, $username, 'use_signature', SMPREF_OFF );
$prefix_sig = getPref($data_dir, $username, 'prefix_sig');
+/* Load timezone preferences */
+$timezone = getPref($data_dir, $username, 'timezone', SMPREF_NONE );
+
/* Load preferences for reply citation style. */
$reply_citation_style =
);
}
+ $TZ_ARRAY[SMPREF_NONE] = _("Same as server");
+ $fd = fopen('../locale/timezones.cfg','r');
+ while (!feof ($fd)) {
+ $zone = fgets($fd, 1024);
+ if( $zone ) {
+ $zone = trim($zone);
+ $TZ_ARRAY["$zone"] = "$zone";
+ }
+ }
+ fclose ($fd);
+
+ $optgrps[SMOPT_GRP_TZ] = _("Timezone Options");
+ $optvals[SMOPT_GRP_TZ] = array();
+
+ $optvals[SMOPT_GRP_TZ][] = array(
+ 'name' => 'timezone',
+ 'caption' => _("Your current timezone"),
+ 'type' => SMOPT_TYPE_STRLIST,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'posvals' => $TZ_ARRAY
+ );
+
/*** Load the Reply Citation Options into the array ***/
$optgrps[SMOPT_GRP_REPLY] = _("Reply Citation Options");
$optvals[SMOPT_GRP_REPLY] = array();
global $username, $data_dir;
set_up_language(getPref($data_dir, $username, 'language'));
-?>
\ No newline at end of file
+$timeZone = getPref($data_dir, $username, 'timezone');
+if ( $timeZone ) {
+ putenv("TZ=".$timeZone);
+}
+?>