diff --git a/CHANGELOG b/CHANGELOG index d006902d0..ad325616c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ === master +* Work around DateTime.jd fractional second bug on JRuby in named_timezones extension (jeremyevans) + * Support fractional times and timestamps on SQLAnywhere (jeremyevans) * Make round_timestamps extension use Dataset#sqltime_precision for rounding Sequel::SQLTime values (jeremyevans) diff --git a/lib/sequel/extensions/named_timezones.rb b/lib/sequel/extensions/named_timezones.rb index f5e2d0cda..9f4467dd2 100644 --- a/lib/sequel/extensions/named_timezones.rb +++ b/lib/sequel/extensions/named_timezones.rb @@ -136,7 +136,7 @@ def convert_output_datetime_other(v, output_timezone) v = output_timezone.utc_to_local(v.new_offset(0)) # Force DateTime output instead of TZInfo::DateTimeWithOffset - DateTime.jd(v.jd, v.hour, v.minute, v.second + v.sec_fraction, v.offset, v.start) + DateTime.civil(v.year, v.month, v.day, v.hour, v.minute, v.second + v.sec_fraction, v.offset, v.start) end # :nodoc: # :nocov: