there seems to be timezones with more than 1 dst start per year :( code should be updated to reflect this :(
On 3 September 2014 16:11, Maxim Solodovnik <[email protected]> wrote: > was tested against multiple Time zones listed here: > http://www.worldtimezone.com/daylight.html and own TZ (Asia/Novosibirsk) > > > On 3 September 2014 16:09, Maxim Solodovnik <[email protected]> wrote: > >> here is the JS code https://gist.github.com/solomax/e86cc77694d67120b8f5 >> to get DST start date/time (if any) >> only minute offset was not tested due to impossibili to set TZ "Chatham >> Island" on my Ubuntu) >> >> similar code can be added to get DST end date/time >> >> the code also might need to be "polished" a little >> >> >> On 3 September 2014 19:59, Martin Grigorov <[email protected]> wrote: >> >>> On Sep 3, 2014 10:39 AM, "Maxim Solodovnik" <[email protected]> >>> wrote: >>> > >>> > Actually my code can be extended to get >>> > 1) if TZ has DST or not >>> > 2) what month DST happening >>> > 3) the day of month DST happening >>> > 4) hour of day DST happening >>> > >>> > I believe after all this info is available the list of time zones with >>> > certain offset can be reduced to better match current user TZ. >>> > I can provide sample JS code for 1-4 above >>> >>> This will increase the chance to include it ! ;-) >>> >>> > >>> > >>> > On 3 September 2014 14:22, Martin Grigorov <[email protected]> >>> wrote: >>> > >>> > > Hi Maxim, >>> > > >>> > > Can you please provide more information how your code solves the >>> problem ? >>> > > AFAIU Robert explains that Wicket's code properly detects the >>> timezone >>> > > offset, but since there are many timezone ids for a given offset it >>> is >>> not >>> > > easy to detect the correct DST from the offset. >>> > > In your code I don't see anything that should provide the missing >>> timezone >>> > > id. >>> > > Or I am missing something ? >>> > > >>> > > Martin Grigorov >>> > > Wicket Training and Consulting >>> > > https://twitter.com/mtgrigorov >>> > > >>> > > >>> > > On Wed, Sep 3, 2014 at 9:44 AM, Maxim Solodovnik < >>> [email protected]> >>> > > wrote: >>> > > >>> > > > Hello All, >>> > > > >>> > > > Some time ago we had user query [1] claiming wicket based TZ >>> detection is >>> > > > not accurate. >>> > > > I believe the detection can be enhanced: DST rules can be detected >>> using >>> > > JS >>> > > > code and taken into account while TZ guessing >>> > > > >>> > > > here is the example of JS code determining month TZ switch is >>> happening: >>> > > > [2] line 50 >>> > > > >>> > > > Maybe it worth to implement something like this in Wicket? >>> > > > >>> > > > [1] http://markmail.org/message/v7vmfburg4zrtizk >>> > > > [2] >>> > > > >>> > > > >>> > > >>> >>> https://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/main/webapp/js/openmeetings_functions.js?revision=1562780&view=markup >>> > > > >>> > > > -- >>> > > > WBR >>> > > > Maxim aka solomax >>> > > > >>> > > >>> > >>> > >>> > >>> > -- >>> > WBR >>> > Maxim aka solomax >>> >> >> >> >> -- >> WBR >> Maxim aka solomax >> > > > > -- > WBR > Maxim aka solomax > -- WBR Maxim aka solomax
