Daylight Saving Time (DST) within one country

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Post Reply
SamG
Registered User
Posts: 1241
Joined: Fri Aug 31, 2001 6:35 pm

Re: Daylight Saving Time (DST) within one country

Post by SamG »

Mvastango wrote:... My solution to this problem, however, addresses all people in all possible locations, while still preserving the accuracy of the post times and at the expense of only an extremely small increase in page generation time...
I personally would like to see a full-blown, real world demo of this solution, something beyond the proof-of-concept test, so that a good sense of load impact would be visible. I'm not saying I know for a fact that a fully operational DST-smart post time stamp will be a significant load. But the proof of concept code really amounts to a small scale test, as I see it, so from an end user point of view, the actual expense of this marginally justified capability is still unknown.
Mvastango
Registered User
Posts: 30
Joined: Wed Jun 09, 2004 12:00 am

Re: Daylight Saving Time (DST) within one country

Post by Mvastango »

Ok. I guess I'll be making the mod now.
Here's the patch against the latest snapshot.

Code: Select all

diff -ru phpBB2.orig/adm/admin_board.php phpBB2/adm/admin_board.php
--- phpBB2.orig/adm/admin_board.php	Wed Jul 21 20:48:13 2004
+++ phpBB2/adm/admin_board.php	Wed Jul 21 21:19:34 2004
@@ -116,8 +116,7 @@
 			'override_user_style'	=> array('lang' => 'OVERRIDE_STYLE',		'type' => 'radio:yes_no', 'explain' => true),
 			'default_lang'			=> array('lang' => 'DEFAULT_LANGUAGE',		'type' => 'select', 'options' => 'language_select('{VALUE}')', 'explain' => false),
 			'default_dateformat'	=> array('lang' => 'DEFAULT_DATE_FORMAT',	'type' => 'text::255', 'explain' => true),
-			'board_timezone'		=> array('lang' => 'SYSTEM_TIMEZONE',		'type' => 'select', 'options' => 'tz_select('{VALUE}')', 'explain' => false),
-			'board_dst'				=> array('lang' => 'SYSTEM_DST',			'type' => 'radio:yes_no', 'explain' => false),
+			'board_time_region'		=> array('lang' => 'SYSTEM_TIMEZONE',		'type' => 'select', 'options' => 'tr_select('{VALUE}')', 'explain' => false),
 			'allow_privmsg'			=> array('lang' => 'BOARD_PM',				'type' => 'radio:yes_no', 'explain' => true),
 			'allow_topic_notify'	=> array('lang' => 'ALLOW_TOPIC_NOTIFY',	'type' => 'radio:yes_no', 'explain' => false),
 			'allow_forum_notify'	=> array('lang' => 'ALLOW_FORUM_NOTIFY',	'type' => 'radio:yes_no', 'explain' => false),
diff -ru phpBB2.orig/includes/functions.php phpBB2/includes/functions.php
--- phpBB2.orig/includes/functions.php	Wed Jul 21 20:48:13 2004
+++ phpBB2/includes/functions.php	Wed Jul 21 22:13:23 2004
@@ -491,21 +491,20 @@
 }
 
 // Pick a timezone
-function tz_select($default = '')
+function tr_select($default = '')
 {
-	global $sys_timezone, $user;
-
+	global $user;
 	$tz_select = '';
-	foreach ($user->lang['tz'] as $offset => $zone)
+	foreach ($user->lang['tr'] as $offset => $region)
 	{
 		if (is_numeric($offset))
 		{
 			$selected = ($offset == $default) ? ' selected="selected"' : '';
-			$tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
+			$tr_select .= '<option value="' . $offset . '"' . $selected . '>' . $region['time_region_name'] . '</option>';
 		}
 	}
 
-	return $tz_select;
+	return $tr_select;
 }
 
 // Topic and forum watching common code
diff -ru phpBB2.orig/includes/session.php phpBB2/includes/session.php
--- phpBB2.orig/includes/session.php	Wed Jul 21 20:48:13 2004
+++ phpBB2/includes/session.php	Wed Jul 21 22:14:19 2004
@@ -469,8 +468,8 @@
 	var $help = array();
 	var $theme = array();
 	var $date_format;
-	var $timezone;
-	var $dst;
+	var $timezone_dst_cache = array();
+	var $tr = array();
 
 	var $lang_name;
 	var $lang_path;
@@ -487,18 +486,14 @@
 		{
 			$this->lang_name = (file_exists($phpbb_root_path . 'language/' . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : $config['default_lang'];
 			$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
-
+			
 			$this->date_format = $this->data['user_dateformat'];
-			$this->timezone = $this->data['user_timezone'] * 3600;
-			$this->dst = $this->data['user_dst'] * 3600;
 		}
 		else
 		{
 			$this->lang_name = $config['default_lang'];
 			$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
 			$this->date_format = $config['default_dateformat'];
-			$this->timezone = $config['board_timezone'] * 3600;
-			$this->dst = $config['board_dst'] * 3600;
 
 			if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
 			{
@@ -530,6 +525,12 @@
 
 		$this->add_lang($lang_set);
 		unset($lang_set);
+		if ($this->data['user_id'] != ANONYMOUS)
+		{
+			$this->tr = $this->lang['tr'][$this->data['user_time_region']];
+		} else {
+			$this->tr = $this->lang['tr'][$config['board_default_time_region']];
+		}
 
 		if (!empty($_GET['style']) && $auth->acl_get('a_styles'))
 		{
@@ -705,7 +706,48 @@
 
 		$format = (!$format) ? $this->date_format : $format;
 
-		return strtr(@gmdate($format, $gmepoch + $this->timezone + $this->dst), $lang_dates);
+		return strtr(@gmdate($format, $this->getAdjustedTimestamp($gmepoch)), $lang_dates);
+	}
+	
+	function getAdjustedTimestamp($timestamp)
+	{
+		if($this->tr['time_region_observes_dst'])
+		{
+			$dst_dates = $this->getDatesForYear(date('Y', $timestamp));
+			$reverse = ($dst_dates['end'] < $dst_dates['start']);
+			if ($reverse)
+			{
+				$start = $dst_dates['end'];
+				$end = $dst_dates['start'];
+			} else {
+				$start = $dst_dates['start'];
+				$end = $dst_dates['end'];
+			}
+			$in_dst = ($timestamp > $start && $timestamp < $end);
+			if($reverse) $in_dst = !$in_dst;
+			if($in_dst)
+			{
+				return $timestamp + ($this->tr['time_region_dst_offset'] * 3600); 
+			} else {
+				return $timestamp + ($this->tr['time_region_normal_offset'] * 3600);
+			}
+		} else {
+			return $timestamp + ($this->tr['time_region_normal_offset'] * 3600);
+		}
+	}
+	function getDatesForYear($year)
+	{
+	   if (isset($this->$timezone_dst_cache[$year]))
+	   {
+		  return $this->timezone_dst_cache[$year];
+	   } else {
+		  $result = array(
+			 'start' => eval($this->tr['time_region_dst_start']),
+			 'end' => eval($this->tr['time_region_dst_end'])
+		  );
+		  $this->timezone_dst_cache[$year] = $result;
+		  return $result;
+	   }
 	}
 
 	function get_iso_lang_id()
diff -ru phpBB2.orig/includes/ucp/ucp_prefs.php phpBB2/includes/ucp/ucp_prefs.php
--- phpBB2.orig/includes/ucp/ucp_prefs.php	Wed Jul 21 20:48:13 2004
+++ phpBB2/includes/ucp/ucp_prefs.php	Wed Jul 21 22:15:33 2004
@@ -29,10 +29,10 @@
 				{
 					$var_ary = array(
 						'dateformat'	=> (string) $config['default_dateformat'], 
-						'lang'			=> (string) $config['default_lang'], 
-						'tz'			=> (float) $config['board_timezone'],
+						'lang'			=> (string) $config['default_lang'],
 						'style'			=> (int) $config['default_style'], 
-						'dst'			=> (bool) $config['board_dst'], 
+						'tr'			=> (float) $config['board_time_region'],
+						'style'			=> (int) $config['default_style'],  
 						'viewemail'		=> false, 
 						'massemail'		=> true, 
 						'hideonline'	=> false, 
@@ -50,7 +50,7 @@
 					$var_ary = array(
 						'dateformat'	=> array('string', false, 3, 15), 
 						'lang'			=> array('match', false, '#^[a-z_]{2,}$#i'),
-						'tz'			=> array('num', false, -13, 13),
+						'tr'			=> array('num', false, 0, 75),
 					);
 
 					$error = validate_data($data, $var_ary);
@@ -71,10 +71,9 @@
 							'user_notify_pm'		=> $notifypm,
 							'user_options'			=> $user->data['user_options'], 
 
-							'user_dst'				=> $dst,
 							'user_dateformat'		=> $dateformat,
 							'user_lang'				=> $lang,
-							'user_timezone'			=> $tz,
+							'user_time_region'		=> $tr,
 							'user_style'			=> $style,
 						);
 
@@ -107,15 +106,12 @@
 				$popuppm = (isset($popuppm)) ? $popuppm : $user->optionget('popuppm');
 				$popup_pm_yes = ($popuppm) ? ' checked="checked"' : '';
 				$popup_pm_no = (!$popuppm) ? ' checked="checked"' : '';
-				$dst = (isset($dst)) ? $dst : $user->data['user_dst'];
-				$dst_yes = ($dst) ? ' checked="checked"' : '';
-				$dst_no = (!$dst) ? ' checked="checked"' : '';
 
 				$notifymethod = (isset($notifymethod)) ? $notifymethod : $user->data['user_notify_type'];
 				$dateformat = (isset($dateformat)) ? $dateformat : $user->data['user_dateformat'];
 				$lang = (isset($lang)) ? $lang : $user->data['user_lang'];
 				$style = (isset($style)) ? $style : $user->data['user_style'];
-				$tz = (isset($tz)) ? $tz : $user->data['user_timezone'];
+				$tr = (isset($tr)) ? $tr : $user->data['user_time_region'];
 
 				$template->assign_vars(array( 
 					'ERROR'				=> (sizeof($error)) ? implode('<br />', $error) : '',
@@ -132,8 +128,6 @@
 					'NOTIFY_PM_NO'		=> $notify_pm_no, 
 					'POPUP_PM_YES'		=> $popup_pm_yes, 
 					'POPUP_PM_NO'		=> $popup_pm_no, 
-					'DST_YES'			=> $dst_yes, 
-					'DST_NO'			=> $dst_no, 
 					'NOTIFY_EMAIL'		=> ($notifymethod == NOTIFY_EMAIL) ? 'checked="checked"' : '', 
 					'NOTIFY_IM'			=> ($notifymethod == NOTIFY_IM) ? 'checked="checked"' : '', 
 					'NOTIFY_BOTH'		=> ($notifymethod == NOTIFY_BOTH) ? 'checked="checked"' : '', 
@@ -142,7 +136,7 @@
 
 					'S_LANG_OPTIONS'	=> language_select($lang), 
 					'S_STYLE_OPTIONS'	=> style_select($style),
-					'S_TZ_OPTIONS'		=> tz_select($tz),
+					'S_TZ_OPTIONS'		=> tr_select($tr),
 					'S_CAN_HIDE_ONLINE'	=> true, 
 					'S_SELECT_NOTIFY'	=> ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false, 
 					)
diff -ru phpBB2.orig/install/schemas/mysql_schema.sql phpBB2/install/schemas/mysql_schema.sql
--- phpBB2.orig/install/schemas/mysql_schema.sql	Wed Jul 21 20:48:13 2004
+++ phpBB2/install/schemas/mysql_schema.sql	Wed Jul 21 20:53:11 2004
@@ -861,8 +861,7 @@
    user_colour varchar(6) DEFAULT '' NOT NULL,
    user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
    user_lang varchar(30) DEFAULT '' NOT NULL,
-   user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL,
-   user_dst tinyint(1) DEFAULT '0' NOT NULL,
+   user_time_region tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
    user_dateformat varchar(15) DEFAULT 'd M Y H:i' NOT NULL,
    user_style tinyint(4) DEFAULT '0' NOT NULL,
    user_rank int(11) DEFAULT '0',
diff -ru phpBB2.orig/install/schemas/schema_data.sql phpBB2/install/schemas/schema_data.sql
--- phpBB2.orig/install/schemas/schema_data.sql	Wed Jul 21 20:48:13 2004
+++ phpBB2/install/schemas/schema_data.sql	Wed Jul 21 21:00:06 2004
@@ -24,9 +24,8 @@
 INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars','.*?');
 INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0');
 INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable_msg','');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_dst','0');
 INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_time_region','0');
 INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb22');
 INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/');
 INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain','');
diff -ru phpBB2.orig/language/en/common.php phpBB2/language/en/common.php
--- phpBB2.orig/language/en/common.php	Wed Jul 21 20:48:13 2004
+++ phpBB2/language/en/common.php	Wed Jul 21 21:59:57 2004
@@ -455,44 +455,15 @@
 		'Nov'		=> 'Nov',
 		'Dec'		=> 'Dec',
 	),
-	
-	'tz'				=> array(
-		'-13'	=> 'GMT - 13 Hours',
-		'-12'	=> 'GMT - 12 Hours',
-		'-11'	=> 'GMT - 11 Hours',
-		'-10'	=> 'GMT - 10 Hours',
-		'-9'	=> 'GMT - 9 Hours',
-		'-8'	=> 'GMT - 8 Hours',
-		'-7'	=> 'GMT - 7 Hours',
-		'-6'	=> 'GMT - 6 Hours',
-		'-5'	=> 'GMT - 5 Hours',
-		'-4'	=> 'GMT - 4 Hours',
-		'-3.5'	=> 'GMT - 3.5 Hours',
-		'-3'	=> 'GMT - 3 Hours',
-		'-2.5'	=> 'GMT - 2.5 Hours',
-		'-2'	=> 'GMT - 2 Hours',
-		'-1'	=> 'GMT - 1 Hours',
-		'0'		=> 'GMT',
-		'1'		=> 'GMT + 1 Hour',
-		'2'		=> 'GMT + 2 Hours',
-		'3'		=> 'GMT + 3 Hours',
-		'3.5'	=> 'GMT + 3.5 Hours',
-		'4'		=> 'GMT + 4 Hours',
-		'4.5'	=> 'GMT + 4.5 Hours',
-		'5'		=> 'GMT + 5 Hours',
-		'5.5'	=> 'GMT + 5.5 Hours',
-		'6'		=> 'GMT + 6 Hours',
-		'6.5'	=> 'GMT + 6.5 Hours',
-		'7'		=> 'GMT + 7 Hours',
-		'8'		=> 'GMT + 8 Hours',
-		'9'		=> 'GMT + 9 Hours',
-		'9.5'	=> 'GMT + 9.5 Hours',
-		'10'	=> 'GMT + 10 Hours',
-		'10.5'	=> 'GMT + 10.5 Hours',
-		'11'	=> 'GMT + 11 Hours',
-		'12'	=> 'GMT + 12 Hours',
-		'13'	=> 'GMT + 13 Hours',
-		'dst'	=> '[ DST ]'
+	'tr' => array(
+		14 	=> array(
+			'time_region_name' => '(GMT -05:00) Eastern Time (US & Canada)',
+			'time_region_normal_offset' => -5,
+			'time_region_observes_dst' => true,
+			'time_region_dst_offset' => -4,
+			'time_region_dst_start' => 'return strtotime("Next Sunday", strtotime("April First $year -1 Day"));',
+			'time_region_dst_end' => 'return strtotime("Last Sunday", strtotime("September First $year"));'
+		)
 	),
 );
 
diff -ru phpBB2.orig/styles/subSilver/template/ucp_prefs_personal.html phpBB2/styles/subSilver/template/ucp_prefs_personal.html
--- phpBB2.orig/styles/subSilver/template/ucp_prefs_personal.html	Wed Jul 21 20:48:13 2004
+++ phpBB2/styles/subSilver/template/ucp_prefs_personal.html	Wed Jul 21 21:16:05 2004
@@ -53,11 +53,7 @@
 	</tr>
 	<tr> 
 		<td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td>
-		<td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
-	</tr>
-	<tr> 
-		<td class="row1" width="50%"><b class="genmed">{L_BOARD_DST}:</b></td>
-		<td class="row2"><input type="radio" name="dst" value="1"{DST_YES} /> <span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" name="dst" value="0"{DST_NO} /> <span class="genmed">{L_NO}</span></td>
+		<td class="row2"><select name="tr">{S_TZ_OPTIONS}</select></td>
 	</tr>
 	<tr> 
 		<td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}:</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
I only included my timezone, but the rest can be easily added - I just didn't want to spend time doing the research.
Mvastango
Registered User
Posts: 30
Joined: Wed Jun 09, 2004 12:00 am

Re: Daylight Saving Time (DST) within one country

Post by Mvastango »

geocator wrote:Sure there is, the whole phpBB philosphy is KISS, if a feature has limited purpose then it stays as a MOD. As far as processing time goes think about those boards with hundreds of people on at time, with millions of posts.
I agree, and that's a great philosophy, which has kept phpBB bloat-free. However, I don't look at this as bloat. I know I keep calling my code a feature, but I don't even think it's much of that either. The 'feature' of displaying the date a post was made has been a core part of phpBB since Version 1 (I'm assuming). To me, the feature is broken. The fact that people are unlikely to notice the breakage doesn't make it any less broken. Making the DST retroactive to all past posts is simply a sloppy workaround for a problem. The way that the time operates right now is extremely counter-intuitive. I would really be surprised if this didn't get reported as a bug by some novice user who has no idea why the post times keep changing every 6 months.
Klors
Registered User
Posts: 95
Joined: Fri Sep 19, 2003 2:08 pm

Re: Daylight Saving Time (DST) within one country

Post by Klors »

Mvastango wrote:I agree, and that's a great philosophy, which has kept phpBB bloat-free. However, I don't look at this as bloat. I know I keep calling my code a feature, but I don't even think it's much of that either. The 'feature' of displaying the date a post was made has been a core part of phpBB since Version 1 (I'm assuming). To me, the feature is broken. The fact that people are unlikely to notice the breakage doesn't make it any less broken. Making the DST retroactive to all past posts is simply a sloppy workaround for a problem. The way that the time operates right now is extremely counter-intuitive. I would really be surprised if this didn't get reported as a bug by some novice user who has no idea why the post times keep changing every 6 months.
*sigh* How many times do I have to say the same thing in the same thread?

Times are not in any way 'broken' from what I can see in 2.1.x (and most likely 2.0.x). Neither is applying a DST change to all times a 'sloppy workaround', it's how times work.

The timezone that you are viewing the boards in is displayed at the top/bottom of the page, if you display a different timezone and DON'T show all times as being different, then you're doing something 'broken'. DST is just another timezone in all of the cases I have seen where a country has one.

You could display the timezone indicator by the time and have them all different.

By all means argue that it's not a user-friendly way, that it doesn't suit your design ideals, blah blah blah. But, it's not broken as far as I can see.
Mvastango
Registered User
Posts: 30
Joined: Wed Jun 09, 2004 12:00 am

Re: Daylight Saving Time (DST) within one country

Post by Mvastango »

Klors wrote:The timezone that you are viewing the boards in is displayed at the top/bottom of the page, if you display a different timezone and DON'T show all times as being different, then you're doing something 'broken'. DST is just another timezone in all of the cases I have seen where a country has one.
This is the problem. DST is not really a seperate timezone in the same sense that the UK is in a different timezone than Germany. DST is simply a seperate GMT offset that an area follows for 6 months at a time. For that reason, the board does not represent DST times as what they are - a different GMT offset for half of the year. Instead of programmig the board to detect the GMT offset that should be applied to any particular time, a single offset is used for all times. Applying a DST change to all times is a sloppy workaround because that is not how times work in real life. The new year starts at 12AM on January 1st. During the summer, the new year isn't said to begin at 11PM on December 31st. That would be, by all standards, absurd.
User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: Daylight Saving Time (DST) within one country

Post by A_Jelly_Doughnut »

In 2.0, that is exactly how time worked (you chose a new GMT offset for DST). But people complained about that too because to them DST isn't a new offset, it is Daylight Savings Time...
A_Jelly_Doughnut
User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Re: Daylight Saving Time (DST) within one country

Post by psoTFX »

Mvastango wrote:Applying a DST change to all times is a sloppy workaround because that is not how times work in real life.
Exqueeze me? Do you care to phrase that with a little more respect for the sheer amount of time we've put into this please? And people wonder why I get irritated, "sloppy implementation" is just the sort of comment I really want to see about something like this!

Some people in this topic seem to think we're idiots, that we've just ignored DST in a "stuff it" type manner ... utter tosh. Want to see why implementing a server/OS/timezone independent global solution has complications? See this link http://www.timeanddate.com/time/aboutdst.html." target="_blank

Now, show me a representative demographic of phpBB users with >51% support for the "I want posting times to be based on local and profile defined timezones irrespective of any complications it may entail" and we'll list it for 2.4.x. Till then it isn't likely to happen, and not at all in 2.2.x. I really cannot be any more plain than this ... it's been suggested, it's been rejected for the next release. If that offends people, well, I'm sorry but that's the way it goes.
SamG
Registered User
Posts: 1241
Joined: Fri Aug 31, 2001 6:35 pm

Re: Daylight Saving Time (DST) within one country

Post by SamG »

Mvastango wrote:... Applying a DST change to all times is a sloppy workaround because that is not how times work in real life. The new year starts at 12AM on January 1st. During the summer, the new year isn't said to begin at 11PM on December 31st. That would be, by all standards, absurd.
Not quite true. In the real world of BBSing, the way phpBB handles post time stamps is not at all absurd. As I've already noted, for most people that I've talked to in all my years of using "a sloppy workaround" in cyberspace (well before phpBB was even born), this is the first time I have encountered this kind of objection. The very first.

Again, I can see the point as a modification. If someone wants precision time stamps, who am I to say that their goal is absurd? But to actually go so far as to suggest that phpBB is somehow extremely odd and out of touch with real life on this point is a less-than-precise observation, in my experience. It is completely out of context, if nothing else.

At any rate, with psoTFX's comment settling the issue in terms of 2.2 core functionality, I'm off to other adventures ...
"I hate trolls!" - Willow Ufgood
Mvastango
Registered User
Posts: 30
Joined: Wed Jun 09, 2004 12:00 am

Re: Daylight Saving Time (DST) within one country

Post by Mvastango »

psoTFX wrote:
Mvastango wrote:Applying a DST change to all times is a sloppy workaround because that is not how times work in real life.
Exqueeze me? Do you care to phrase that with a little more respect for the sheer amount of time we've put into this please? And people wonder why I get irritated, "sloppy implementation" is just the sort of comment I really want to see about something like this!

Some people in this topic seem to think we're idiots, that we've just ignored DST in a "stuff it" type manner ... utter tosh. Want to see why implementing a server/OS/timezone independent global solution has complications? See this link http://www.timeanddate.com/time/aboutdst.html." target="_blank
I'm sorry if I offended you. That wasn't my intention. I wasn't trying to criticize the great work you guys do. It just seems to me that the method of implementation that phpBB employs (as do other BBS’s) in displaying the times isn't as good as it could/should be. That isn't to say you are idiots (which I totally do not think you are) and I was sure you investigated how to make DST work before actually coding it. I had reasoned that you decided the change wasn't worth the time involved in making it. When I was coding my mod, I came across that link, and at no point did I doubt this was a complex problem. I admit that my solution isn't perfect either - the page says "Daylight Saving Time is difficult to predict in future, many countries change the transition days/principles every year because of special happenings or conditions that has happened or will happen. " So short of having an extremely complex list of when DST started and ended in each country/region for each year, this would be impossible to implement perfectly (That isn't to mention what would then be the more performance impact, since database queries would probably be required). My mod takes/would take into account the current DST start/end dates for every region, which will work well enough to remove any noticeable discrepancy.
psoTFX wrote:Now, show me a representative demographic of phpBB users with >51% support for the "I want posting times to be based on local and profile defined timezones irrespective of any complications it may entail" and we'll list it for 2.4.x. Till then it isn't likely to happen, and not at all in 2.2.x. I really cannot be any more plain than this ... it's been suggested, it's been rejected for the next release. If that offends people, well, I'm sorry but that's the way it goes.
As I said previously, this handling is a relatively minor quirk that most people won't notice. I wouldn't even want "posting times to be based on local and profile defined timezones irrespective of any complications it may entail", simply because getting it to work perfectly will most likely cause a performance degradation much more obvious than the inaccuracy of the time. I do however, think (or at least I would like to think) that >51% of phpBB users who understand this problem (such as the php programmers on this forum, etc.) would think it's a good idea to have a relatively seamless handling of DST in applicable areas at the expense of a couple hundredths of a second in page load time. I am not offended. I may disagree with you, but I understand your position and respect it.
geocator
Registered User
Posts: 100
Joined: Fri Jan 09, 2004 11:45 pm

Re: Daylight Saving Time (DST) within one country

Post by geocator »

Mvastango wrote: So short of having an extremely complex list of when DST started and ended in each country/region for each year, this would be impossible to implement perfectly (That isn't to mention what would then be the more performance impact, since database queries would probably be required). My mod takes/would take into account the current DST start/end dates for every region, which will work well enough to remove any noticeable discrepancy.
So you dont think anyone will notice this but you think people will notice the one hour change. That is definatley round robin reasoning.
Post Reply