timezone - Rails ignore daylight savings time -


i having trouble understanding rails' time zone support when comes daylight savings time.

i storing all database times in utc. user timezones stored map directly activesupport::timezone values (i.e. central time (us & canada)).

i want ignore daylight savings time. if event starts @ 5:30pm, starts @ 5:30pm whether daylight savings time in effect or not.

is possible, considering times stored uniformly, retrieve database times , display them locally daylight savings ignored? there problems going run ignoring daylight savings?

i don't mean sound pedantic, but...

i want ignore daylight savings time.

well, on own then. despite our best hopes , wishes, of real world uses daylight saving time. you can quick primer here.

if event starts @ 5:30pm, starts @ 5:30pm whether daylight savings time in effect or not.

5:30 who? if you're saying 5:30 utc, sure. if you're saying 5:30 in central time, have take dst account. otherwise, half of year people show @ event @ think 5:30 , think 6:30.

is possible, considering times stored uniformly, retrieve database times , display them locally daylight savings ignored?

you're storing times in utc, good. when display them locally, should not ignore dst.

are there problems going run ignoring daylight savings?

yes, people don't commonly understand this. it's expected if refer local time, mean time local them. if don't include dst in calculation, have disagreement time talking about.

another word of advice, might want consider using tzinfo gem instead of activesupport::timezone. store time zone selection using iana identifiers such america/chicago. these recognizable outside of rails.

for unexplained reason, activesupport folks thought should limit time zones 146 values felt "meaningful". didn't explain process, , don't seem on top of maintenance. i've asked why, haven't gotten of detailed response.

you may wish review the timezone tag wiki.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -