Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7862ef197393
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0596e576d59b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Sep 4, 2015

  1. return UTC instead of GMT (fixes #3304)

    As per Ruby's Time#zone [1] UTC should be used instead of GMT
    since Ruby 1.8. This also fixes #3304.
    
    [1] http://ruby-doc.org/core-2.2.3/Time.html#method-i-zone
    tdaitx committed Sep 4, 2015
    Copy the full SHA
    b681987 View commit details

Commits on Sep 8, 2015

  1. Merge pull request #3310 from tdaitx/fix-3304-return-utc

    return UTC instead of GMT (fixes #3304)
    mkristian committed Sep 8, 2015
    Copy the full SHA
    0596e57 View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/src/main/java/org/jruby/RubyTime.java
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/RubyTime.java
Original file line number Diff line number Diff line change
@@ -858,13 +858,13 @@ public static String zoneHelper(String envTZ, DateTime dt, boolean isTzRelative)
int hourOffset = Integer.valueOf(offsetMatcher.group(2));

if (zone.equals("+00:00")) {
zone = "GMT";
zone = "UTC";
} else {
// try non-localized time zone name
zone = dt.getZone().getNameKey(dt.getMillis());
if (zone == null) {
char sign = minus_p ? '+' : '-';
zone = "GMT" + sign + hourOffset;
zone = "UTC" + sign + hourOffset;
}
}
}