@Specialization public RubyTime timeSDup(RubyTime other) { final RubyTime time = new RubyTime( getContext().getCoreLibrary().getTimeClass(), other.getDateTime(), other.getOffset()); return time; }
@Specialization public Object timeUTCOffset(RubyTime time) { Object offset = time.getOffset(); if (offset != nil()) { return offset; } else { return time.getDateTime().getZone().getOffset(time.getDateTime().getMillis()) / 1_000; } }