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: c7e3dcb31925
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e8ee76309f9a
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 26, 2016

  1. Copy the full SHA
    9411be4 View commit details

Commits on Mar 29, 2016

  1. Merge pull request #3758 from bmulvihill/strftime-fix

    Fix strftime %Z to act like CRuby
    kares committed Mar 29, 2016
    Copy the full SHA
    e8ee763 View commit details
Showing with 1 addition and 5 deletions.
  1. +1 −5 core/src/main/java/org/jruby/RubyTime.java
6 changes: 1 addition & 5 deletions core/src/main/java/org/jruby/RubyTime.java
Original file line number Diff line number Diff line change
@@ -896,17 +896,13 @@ public static String getRubyTimeZoneName(String envTZ, DateTime dt) {
Matcher offsetMatcher = TIME_OFFSET_PATTERN.matcher(zone);

if (offsetMatcher.matches()) {
boolean minus_p = offsetMatcher.group(1).equals("-");
int hourOffset = Integer.valueOf(offsetMatcher.group(2));

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