Hello,
I am not understanding the behavior of DateTime.now.
For example (I’m in EST, which is UTC-5:00),
irb(main):001:0> require ‘date’
=> true
irb(main):002:0> DateTime.now.offset
=> Rational(-301, 1440)
Why is this -301/1440 instead of -300/1440? After reading through the
sources, the addition occurs on date.rb:1270
d += d / d.abs if d.nonzero?
What’s the point of this addition? As a result all times are off by a
minute, which I don’t really want.
I am using ruby 1.8.1 (2003-10-31) [i386-freebsd4]
···
–
That’s some catch, that Catch-22.
Oh, it’s the best there is.