private static int parseOffset(String str) { // Can't use a real chronology if called during class // initialization. Offset parser doesn't need it anyhow. Chronology chrono = new BaseChronology() { public DateTimeZone getZone() { return null; } public Chronology withUTC() { return this; } public Chronology withZone(DateTimeZone zone) { return this; } public String toString() { return getClass().getName(); } }; return -(int) offsetFormatter().withChronology(chrono).parseMillis(str); }
private static int parseOffset(String str) { // Can't use a real chronology if called during class // initialization. Offset parser doesn't need it anyhow. Chronology chrono = new BaseChronology() { private static final long serialVersionUID = -3128740902654445468L; public DateTimeZone getZone() { return null; } public Chronology withUTC() { return this; } public Chronology withZone(DateTimeZone zone) { return this; } public String toString() { return getClass().getName(); } }; return -(int) offsetFormatter().withChronology(chrono).parseMillis(str); }