timcharper / calendar_date_select

A previously popular but no longer maintained JavaScript DatePicker for RubyOnRails (and others)
http://code.google.com/p/calendardateselect/
Other
409 stars 179 forks source link

I can't select October 17th 2010 #13

Closed fredhp closed 14 years ago

fredhp commented 14 years ago

When I select it, October 16th is shown. It only happens in 2010, 2009 and 2011 works fine. Thank you, Fred

fredhp commented 14 years ago

It only happens when :time => false or :time => 'mixed'

fredhp commented 14 years ago

No, I'm wrong, sorry... I put :time => true in some places and this issue still happened. I will test more

fredhp commented 14 years ago

I can't explain exactly what is happening, so I put a video on YouTube: http://www.youtube.com/watch?v=i1kATOtNNZU you need to see it at 480p resolution and in fullscreen

fredhp commented 14 years ago

Men, I found a ruby bug: on Windows 7, both 1.8.7 and 1.9.1 versions: C:\Users\fred>irb irb(main):001:0> Time.local(2010, 10, 17) => 2010-10-16 23:00:00 -0300 irb(main):002:0> Time.local(2010, 10, 16) => 2010-10-16 00:00:00 -0300 irb(main):003:0> Time.local(2010, 10, 18) => 2010-10-18 00:00:00 -0300 irb(main):004:0> Time.local(2010, 10, 17, 0, 1) => 2010-10-16 23:01:00 -0300

on Linux: [fred@fredpc ~]# irb irb(main):001:0> Time.local(2010, 10, 17) => 2010-10-17 01:00:00 -0200 irb(main):002:0> Time.local(2010, 10, 16) => 2010-10-16 00:00:00 -0300 irb(main):003:0> Time.local(2010, 10, 18) => 2010-10-18 00:00:00 -0200 irb(main):004:0> Time.local(2010, 10, 17, 1) => 2010-10-17 01:00:00 -0200

fredhp commented 14 years ago

Maybe it all is happening both in Ruby and JavaScript because of daylight saving time http://redmine.ruby-lang.org/issues/show/3950

fredhp commented 14 years ago

It worked on ruby, now I need to uso UTC in JavaScript