Convert a UTC offset in minutes to fraction of a day
Ruby DateTime has basic time zone functionality. It accepts an offset parameter which is a fraction of a day.
offset = Rational(3600, 60 * 60 * 24) DateTime.new(2007,7,27,9,30,44, offset)
Ruby DateTime has basic time zone functionality. It accepts an offset parameter which is a fraction of a day.
offset = Rational(3600, 60 * 60 * 24) DateTime.new(2007,7,27,9,30,44, offset)
RubyGetFractionalOffset (last edited 2010-04-15 14:37:27 by DavidKeen)