Topic: Make daylight saving a global option
I'd like to set the daylight saving option globally and use this setting as default for user registration.
Unfortunately no one can be told what FluxBB is - you have to see it for yourself.
You are not logged in. Please login or register.
FluxBB.org Forums » Feature requests » Make daylight saving a global option
I'd like to set the daylight saving option globally and use this setting as default for user registration.
Not going to happen in the core, since DST is not a global thing. It's a personal setting that depends on where the person is in the world and when it is.
But the global board time is also set as default when registering. Isn't this also a personal setting?
Furthermore it makes sense that a board runs with the same time (daylight saving included) as the region it is intended for.
Touché ![]()
You're right, with the ability to set the default timezone for guests there needs to be the ability to toggle DST on/off to keep times in sync. The way you presented it originally made me think only of the affect on new registrations, not of the impact on guests and the board as a whole.
![]()
Someone could write an extension for automatic DST switching and another one for time, DST and language preselection based on the browserinformation... ![]()
Is my proposal going to be incorporated or do you want me to write a patch first? ![]()
I'll add it at some point, but I'm quite busy atm
Thanks for clarification.
Done in 575.
The patch I supplied didn't solve the primary problem. Here's a patch that uses the forum dst as default value in the registration process:
File: /register.php
Add below line 467:
$select_dst = isset($_POST['dst']) ? $_POST['dst'] : $forum_config['o_default_dst'];Replace line 471 with:
<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="dst" <?php $select_dst ? 'checked="checked" ' : '') ?>/></span>That doesn't make sense. Why use the forum DST as the default? If the user doesn't check the DST box, then they don't want to observe DST regardless of what the forum is doing.
In the registration process the forum setting is used for the timezone, so why shouldn't it be used for DST?
I can't imagine a situation where someone living in a country with DST doesn't want to use it.
In the registration process the forum setting is used for the timezone, so why shouldn't it be used for DST?
Because if $_POST['timezone'] is not set then it means the user is looking at a new form which should include the default values.
For $_POST['dst'] this is not the case, if it isn't set the user either has left the box unticked OR is looking at a new form. Changing the users selection to the default after they have selected something is worse than the initial "default" not matching the boards default.
I am fairly sure Smartys was referring to the fix not making sense, rather than the idea. Granted it shouldn't be hard to fix properly.
Edit: Okay should be done in r703.
Last edited by Reines (2008-09-24 17:31:15)
I actually misinterpreted the code: in just glancing at it, I thought it was being used to determine whether or not to enable DST when the form was submitted. But Reines noticed the actual problem which my post coincidentally happened to allude to.
Thanks.
I'm currently using punbb and noticing that people in some countries currently get the wrong time because the US is still in summer time but the UK is now in winter time
Would it not make more sense to adjust the time according to the clock of the local PC with client side javascript - so it would output something like
Post_time=now()-1.23 hours
and the browser would display the relevant time without all the users having to select a timezone at all.
It seems kind of poor to me that we force everyone to select a timezone but then still get it wrong for a couple of weeks every year because different countries switch DST on different days - this patch is an improvement but surely its something that can be automated.
Also I think that asking the time is not really a good first impression to have on the user signup page, it just makes me think WTF this system can't even figure out what time it is! (you could at least get it to default to something sensible)
This would also have the bonus effect that users who are not signed in would also see the correct times.
I appreciate that fluxBB is supposed to be lightweight but surely this would not need that much CPU?
Also I think having the tickbox called 'daylight savings' is a bit confusing, that is asking the user to state 'YES my country uses DST so you can adjust times in the summer when required'.
What it actually means is "you are going to have to visit this settings page twice a year and toggle this setting"
If it has to be a manual process then maybe the wording on the tickbox should just read: "Adjust times by 1 hour"
Adjust for DST: Daylight savings is in effect (advance times by 1 hour)
That is what it says
Erm, Lanark, it's a profile setting. The global setting is there as a default and for guests.
Erm, Lanark, it's a profile setting.
yes I think thats the problem - the user is running a machine presumably with a clock and time saving set the way they like, why cant the board just read that automatically.
The global setting is there as a default and for guests.
when the guests are in different countries there is no 'right' global setting.
Adjust for DST: Daylight savings is in effect (advance times by 1 hour)
That is what it says
OK I see, I must have skimmed over that.
I still think it would be nice if setting this could be automated, then you could leave it out of the initial sign up page and it would just be another setting people can tinker with if needed.
That would be an extension, not part of the core. People disable Javascript, you can't rely on it 100%.
It would only be javascript if you were preseting the field. If you were leaving out the field alltogether it would just mean setting a default value based on a timezone/dst lookup to compare current date with dst dates. The problem with that is not only is it different from timezone to timezone but the dates aren't constant e.g. in UK its 2am on the last Sunday of October.
FluxBB.org Forums » Feature requests » Make daylight saving a global option
Powered by FluxBB
[ Generated in 0.027 seconds, 9 queries executed ]