Browse files

Fix JRUBY-4842: Time#utc_offset is incorrect in small time range. Spe…

…cs are in RubySpec a186c01.
  • Loading branch information...
1 parent 0277221 commit fe7990091068c7603961457b40d0b7cf1ab4ae23 @BanzaiMan BanzaiMan committed Jun 2, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/org/jruby/RubyTime.java
View
2 src/org/jruby/RubyTime.java
@@ -602,7 +602,7 @@ public RubyRational subsec() {
@JRubyMethod(name = {"gmt_offset", "gmtoff", "utc_offset"})
public RubyInteger gmt_offset() {
- int offset = dt.getZone().getOffsetFromLocal(dt.getMillis());
+ int offset = dt.getZone().getOffset(dt.getMillis());
return getRuntime().newFixnum((int)(offset/1000));
}

0 comments on commit fe79900

Please sign in to comment.