Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) Re: Is the YaBBforum.com server time currently off +10 (Read 984 times)
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,790
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #22 - Mar 19th, 2014 at 2:31am
Post Tools
Dandello and I talked at length today about the 'DST time issue'.

Here's what we know, and what we are going to do:

A. From the 'operational data' point of view, YaBB works absolutely correctly with regard to posts, edits, logins, registrations etc.  And we are going to 'hands-off' on that for YaBB 2.6.0+.

B. The user-side (UCP) adjustments that are based on DST/Summer Time (rest of the world) check boxes do not work at all. The server-side Admin Center DST/Summer Time (rest of the world) adjustment only works in limited conditions.  The underlying cause is 'no method to accurately obtain the true Time Zone'. Time Zones are politically driven and subject to constant revision.  THUS - even if we had your geographically based time offset, we could not tell when DST/SummerTime began and ended each year OR if it had been legislatively 'revoked'.

C. An examination of the code and data revealed we still had some date/time strings stored as 'plain text' (mm/dd/yyyyy). We also had a few places where calls were made to 'localtime'/aka 'servertime' instead of gmt/utctime.  A data example is birthdate.  There are NO unresolved data substantive differences, simply differences in representation of the data.

.. Sooooooo ..

For version 2.6.0 -

We will 'turn off' DST/Summer Time related data adjustments, and program 'conversions' to default that variable to '0'.
In the UCP and Admin Center we will disable access to that item, and the Time Zone item.  Server, Display and Data time will be kept as Epoch Time (as it is now) based on Time::GMT/UTC (which is non-adjusted time).  You will still be able to 'shim' time on both sides with manual adjustments.

Past version 2.6.0 -

We are completely revising to Time Zone adjustments for Display purposes. It is very likely the Time Zone data will be captured on Setup for servers and on registration for users.  The time capture may be passive (display 'guessed TZ 'with opt-out) or active (select from Drop Down list). Guest Time will ALWAYS be server time.  All Data representations will become Epoch Time (aka Unix/Linux Time Stamp).


We are probably also going to go to standardized time strings. This means you get a single drop-down list in Admin Center and in UCP for world standard time formats.  YaBB will do all the heavy lifting automatically after that point.  The Forum will default to the Admin Center string, and every user will be able to select their own variation.  This will be do-able because all time data will already be in Epoch Time.

http://en.wikipedia.org/wiki/Unix_time

For those who read carefully, you may see an issue. (good luck on the hunt  Smiley ). It is one I have already dealt with, and I discussed a solution with Dandello. BONUS POINTS for anyone who can both 'see' the issue and propose a straightforward workaround.

Thanks to RonS2 for reporting the DST Adjustment issue.

Cool








  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,202
Location: Earth

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #21 - Mar 18th, 2014 at 3:48pm
Post Tools
Where I'm at with this one - all the time stuff works fine in UTC (since YaBB was already saving most time stamps as GMT/UTC.)

What doesn't work and has never worked right is the user time offset to determine TZ and the DST call.

I'm still working it but  the 'right' way will take me at least a week to figure out how to implement and test.
« Last Edit: Mar 18th, 2014 at 5:54pm by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,202
Location: Earth

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #20 - Mar 17th, 2014 at 11:44pm
Post Tools
There is a Perl Module called DateTime::TimeZone that, in theory, would do the trick.

Frankly, I'm not a strong enough javascript/Ajax coder to get the browser offset into Perl without using another cookie.

However, since nearly all of YaBB's time calls were already to gmtime, switching all of them to gmtime shouldn't break anything.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,790
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #19 - Mar 17th, 2014 at 8:58pm
Post Tools
A. I think you are doing some very good research. Smiley

B. I also think there may be differing views about what should be displayed.

C. (B.) above may very well be a function of the board's purpose/scope.

D. I think the absolute ideal situation is where you get TZ's by code and adjust via NTP periodically.

IN theory, (D.) really means only one side has to be synced.

Smiley



  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,202
Location: Earth

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #18 - Mar 17th, 2014 at 7:45pm
Post Tools
In doing some research - in getting TZ and DST there's a good way, a bad way and more than one wrong way. (YaBB is currently using one of the wrong ways.  Roll Eyes )

Getting the time via javascript from the user's computer is considered a 'bad way' since you can't guarantee they've got their machine set correctly and some OS/browser combos just don't cooperate.

The 'Good' way is to get a Perl Module that has a copy of the current 'Olsen tables' to make people choose their actual TZ/country and get the time zone data from that. The downside there is that you can't guarantee your hosting service is properly updating the tables. (Not to mention some fairly major refactoring of code in Profiles and DateTime.)
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,790
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #17 - Mar 17th, 2014 at 6:01pm
Post Tools
Question on 'What the Dynamic Clock should represent' now in Think Tank
Roll Eyes
Off-Topic replies have been moved to this Topic.
« Last Edit: Mar 17th, 2014 at 6:03pm by JonB »  

I find your lack of faith disturbing.
Back to top
IP Logged
 
RonS2
Senior Member
Beta Testers
****
Offline



Posts: 521

YaBB 2.5.2
Re: Is the YaBBforum.com server time currently off +10
Reply #16 - Mar 17th, 2014 at 5:05pm
Post Tools
JonB wrote on Mar 17th, 2014 at 4:42pm:
Here's what drives logisticians and developers freekin nuts -

There is the additional complication that politics plays a part in whether and/or when some areas observe DST/EU 'Summer Time'.  As I recall NZ or AU just blew off Summer Time. 



I think that is the beauty of grabbing the time off the desktop, the end user will never have to worry about the time on Yabb, just his own system
  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,790
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #15 - Mar 17th, 2014 at 4:42pm
Post Tools
Here's what drives logisticians and developers freekin nuts -

There is the additional complication that politics plays a part in whether and/or when some areas observe DST/EU 'Summer Time'.  As I recall NZ or AU just blew off Summer Time.  

In fact, in the Florida House of Representatives there is currently a bill pending to go to year-round 'summer time/DST'.  Not a good time to ask me what I think of politicians.

http://www.myfloridahouse.gov/Sections/Bills/billsdetail.aspx?BillId=51788

Quote:
14-00049-14 201474__
Page 1 of 1
CODING: Words stricken are deletions; words underlined are additions.
1 A bill to be entitled
2 An act relating to daylight saving time; providing a
3 short title; requiring that the State of Florida and
4 its political subdivisions observe daylight saving
5 time year-round; providing an effective date.
6
7 Be It Enacted by the Legislature of the State of Florida:
8
9 Section 1. (1) This section may be cited as the “Sunshine
10 Protection Act.”
11 (2) Notwithstanding how time is advanced pursuant to 15
12 U.S.C. s. 260(a), daylight saving time shall be the year-round
13 standard time of the entire state and all of its political
14 subdivisions.
15 Section 2. This act shall take effect July 1, 2014.


I wonder whom (if anyone) was polled before they came up with that genius suggestion.  I'd bet on a lobbyist at work. oops - Gee he represents DisneyWorld - no wondering needed any longer  Wink

The Reedy Creek Development District hard @ work...

Grin

AND just so you know we don't just think 'one-way' here in the SUnshine State (from Wikipedia)
Quote:
Daylight time is less useful in Florida than in many other states because of its southern location[vague]. There is opposition to DST in Florida.[19] State senator Bill Posey introduced a bill in March 2008 to abolish daylight time in the state and keep Florida on year-round standard time.[20] Because Florida straddles two time zones, the Florida legislature has the option of returning all or part of the state to standard time along time zone boundaries. [dated info]


Cheesy
« Last Edit: Mar 17th, 2014 at 5:15pm by JonB »  

I find your lack of faith disturbing.
Back to top
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,790
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #14 - Mar 17th, 2014 at 4:25pm
Post Tools
A. Yep, we plan on some javascript to get localtime in some fashion.

I'm going to leave it to Dandello as to what best suits our needs, and whether we should go for a re-write or a fix.

thanks

Wink
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,202
Location: Earth

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #13 - Mar 17th, 2014 at 4:22pm
Post Tools
@Ron : Something like that - the tricky part is getting the Perl subroutine to read the javascript variables - haven't had time to look at that yet.

This is now an official bug so it's definitely on the todo list.
(Of course DST does work IF the server AND the user are in the same country AND the server knows what country it's in and can grab the info it needs to render localtime. And even then it still won't show the proper time in oddball locations.)
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
RonS2
Senior Member
Beta Testers
****
Offline



Posts: 521

YaBB 2.5.2
Re: Is the YaBBforum.com server time currently off +10
Reply #12 - Mar 17th, 2014 at 3:46pm
Post Tools
I know you folks know this stuff WAY better than I do.

Couldn't something like this work? As I'm sure you know the code takes the time and date from the computer instead of the server

Code (Javascript)
Select All
<script>
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout(function(){startTime()},500);
}

function checkTime(i)
{
if (i<10)
  {
  i="0" + i;
  }
return i;
}
</script>  

  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,790
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: Re: Is the YaBBforum.com server time currently off +10
Reply #11 - Mar 17th, 2014 at 12:19pm
Post Tools
This Topic was moved here from Talk It Up! [move by] JonB.
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,202
Location: Earth

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #10 - Mar 17th, 2014 at 2:18am
Post Tools
On the todo loist for tomorrow or so.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,790
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #9 - Mar 17th, 2014 at 12:53am
Post Tools
See PM Smiley

Edited:
Quote:
AHA! - The isdist function in Perl reads the time stamp/ daylight savings time on the server - and UTC always has an isdist of 0. We'll have to use Javascript to make it behave for end users.

SAY AMEN SISTER! --

now where is my 'clapping hands' smiley/gif?.
« Last Edit: Mar 17th, 2014 at 12:57am by JonB »  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,202
Location: Earth

YaBB 2.6.0
Re: Is the YaBBforum.com server time currently off +10
Reply #8 - Mar 17th, 2014 at 12:10am
Post Tools
You can get the local TZ via javascript. (assuming your OS/browser allows it.)

Edited:
Also You can set your TZ in Profile and Perl does have a 'isdist' within the date/time function - but I'll have to look into how that knows what's happening.


Edited:
AHA! - The isdist function in Perl reads the time stamp/ daylight savings time on the server - and UTC always has an isdist of 0. We'll have to use Javascript to make it behave for end users.
« Last Edit: Mar 17th, 2014 at 12:53am by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Topic Tools
 
  « Board Index ‹ Board  ^Top