Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another fix for #5418 #5560

Merged
merged 1 commit into from Jan 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/ext/date/RubyDate.java
Expand Up @@ -78,6 +78,7 @@ public class RubyDate extends RubyObject {

static final Logger LOG = LoggerFactory.getLogger(RubyDate.class);

static final GJChronology CHRONO_ITALY = GJChronology.getInstance();
static final GJChronology CHRONO_ITALY_UTC = GJChronology.getInstance(DateTimeZone.UTC);

// The Julian Day Number of the Day of Calendar Reform for Italy
Expand Down Expand Up @@ -713,7 +714,7 @@ public static IRubyObject _valid_weeknum_p(ThreadContext context, IRubyObject se

@JRubyMethod(meta = true)
public static RubyDate today(ThreadContext context, IRubyObject self) { // sg=ITALY
return new RubyDate(context.runtime, (RubyClass) self, new DateTime(getChronology(context, ITALY, 0)).withTimeAtStartOfDay());
return new RubyDate(context.runtime, (RubyClass) self, new DateTime(CHRONO_ITALY).withTimeAtStartOfDay());
}

@JRubyMethod(meta = true)
Expand Down