Skip to content

Commit

Permalink
Always include zone
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Sep 9, 2023
1 parent 86b73de commit 29833da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/main/java/org/jruby/RubyTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -1323,11 +1323,11 @@ private RubyString mdump(final Ruby runtime) {
if (zone != DateTimeZone.UTC) {
long offset = zone.getOffset(dt.getMillis());
string.setInternalVariable("offset", runtime.newFixnum(offset / 1000));
}

String zoneName = zone.getShortName(dt.getMillis());
if (!TIME_OFFSET_PATTERN.matcher(zoneName).matches()) {
string.setInternalVariable("zone", runtime.newString(zoneName));
}
String zoneName = zone.getShortName(dt.getMillis());
if (!TIME_OFFSET_PATTERN.matcher(zoneName).matches()) {
string.setInternalVariable("zone", RubyString.newUSASCIIString(runtime, zoneName));
}

return string;
Expand Down

0 comments on commit 29833da

Please sign in to comment.