Asia
67
Status: ResolvedA resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved
FULL sản phẩm VERSION :java version "1.7.0_65"Java(TM) SE Runtime Environment (build 1.7.0_65-b17)Java HotSpot(TM) 64-Bit vps VM (build 24.65-b04, mixed mode)ADDITIONAL OS VERSION INFORMATION :Linux larrylopez-wsl1 3.13.0-39-generic #66~precise1-Ubuntu SMP Wed Oct 29 09:56:49 UTC năm trước x86_64 x86_64 x86_64 GNU/LinuxEXTRA RELEVANT SYSTEM CONFIGURATION :The latest tzupdater.jar was applied: tzupdater-1.4.9-2014iA description OF THE PROBLEM :Since the latest tzupdater-1.4.9-2014i was applied, we have had 26 cases of customers encountering exceptions in Calendar.getTime(), all using the timezone Asia/Ho_Chi_MinhWe have had to rollback that timezone file(jre/lib/zi/Asia/Ho_Chi_Minh) to temporarily fix the issue.I tested all timezones và the following cause exceptions with the above code(all these are in the Asia/Ho_Chi_Minh file):Asia/Ho_Chi_MinhAsia/SaigonVSTADDITIONAL REGRESSION INFORMATION: This was working using the previous data before the tzupdater-1.4.9-2014i was applied.STEPS to lớn FOLLOW lớn REPRODUCE THE PROBLEM :1. Apply latest tzupdater.jar ( tzupdater-1.4.9-2014i )2. Compile & run this program to test all timezones:import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Locale;import java.util.TimeZone;public class Main public static void main(String<> args) for(String tz: TimeZone.getAvailableIDs()) try test(tz);catch(Exception e) System.out.println("failed: " + tz + " Exception: " + e);public static void test(String tz) TimeZone brokenTimeZone = TimeZone.getTimeZone(tz);DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, new Locale("en"));df.setLenient(false);df.setTimeZone(brokenTimeZone);Calendar calendar = df.getCalendar();calendar.set(1959, Calendar.DECEMBER, 31, 23, 0);((SimpleDateFormat)df).set2DigitYearStart(calendar.getTime());EXPECTED VERSUS ACTUAL BEHAVIOR :EXPECTED -No exceptions should be reported.ACTUAL -The following exceptions occur:failed: Asia/Ho_Chi_Minh Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960failed: Asia/Saigon Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960failed: VST Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960ERROR MESSAGES/STACK TRACES THAT OCCUR :failed: Asia/Ho_Chi_Minh Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960failed: Asia/Saigon Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960failed: VST Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960REPRODUCIBILITY :This bug can be reproduced always.---------- BEGIN SOURCE ----------import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Locale;import java.util.TimeZone;public class Main public static void main(String<> args) for(String tz: TimeZone.getAvailableIDs()) try test(tz);catch(Exception e) System.out.println("failed: " + tz + " Exception: " + e);public static void test(String tz) TimeZone brokenTimeZone = TimeZone.getTimeZone(tz);DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, new Locale("en"));df.setLenient(false);df.setTimeZone(brokenTimeZone);Calendar calendar = df.getCalendar();calendar.set(1959, Calendar.DECEMBER, 31, 23, 0);((SimpleDateFormat)df).set2DigitYearStart(calendar.getTime());---------- kết thúc SOURCE ----------CUSTOMER SUBMITTED WORKAROUND :Change timezone lớn another like Asia/Bangkok or rollback jre/lib/zi/Asia/Ho_Chi_Minh file to previous version before tzupdater-1.4.9-2014i was applied.
Attachments
duplicates
JDK-8246167 Calendar.getTime throws excepting for Asia/Ho_Chi_Min timezone ResolvedA resolution has been taken, & it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved
Bạn đang xem: Asia
Priority: P4FULL sản phẩm VERSION :java version "1.7.0_65"Java(TM) SE Runtime Environment (build 1.7.0_65-b17)Java HotSpot(TM) 64-Bit vps VM (build 24.65-b04, mixed mode)ADDITIONAL OS VERSION INFORMATION :Linux larrylopez-wsl1 3.13.0-39-generic #66~precise1-Ubuntu SMP Wed Oct 29 09:56:49 UTC năm trước x86_64 x86_64 x86_64 GNU/LinuxEXTRA RELEVANT SYSTEM CONFIGURATION :The latest tzupdater.jar was applied: tzupdater-1.4.9-2014iA description OF THE PROBLEM :Since the latest tzupdater-1.4.9-2014i was applied, we have had 26 cases of customers encountering exceptions in Calendar.getTime(), all using the timezone Asia/Ho_Chi_MinhWe have had to rollback that timezone file(jre/lib/zi/Asia/Ho_Chi_Minh) to temporarily fix the issue.I tested all timezones và the following cause exceptions with the above code(all these are in the Asia/Ho_Chi_Minh file):Asia/Ho_Chi_MinhAsia/SaigonVSTADDITIONAL REGRESSION INFORMATION: This was working using the previous data before the tzupdater-1.4.9-2014i was applied.STEPS to lớn FOLLOW lớn REPRODUCE THE PROBLEM :1. Apply latest tzupdater.jar ( tzupdater-1.4.9-2014i )2. Compile & run this program to test all timezones:import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Locale;import java.util.TimeZone;public class Main public static void main(String<> args) for(String tz: TimeZone.getAvailableIDs()) try test(tz);catch(Exception e) System.out.println("failed: " + tz + " Exception: " + e);public static void test(String tz) TimeZone brokenTimeZone = TimeZone.getTimeZone(tz);DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, new Locale("en"));df.setLenient(false);df.setTimeZone(brokenTimeZone);Calendar calendar = df.getCalendar();calendar.set(1959, Calendar.DECEMBER, 31, 23, 0);((SimpleDateFormat)df).set2DigitYearStart(calendar.getTime());EXPECTED VERSUS ACTUAL BEHAVIOR :EXPECTED -No exceptions should be reported.ACTUAL -The following exceptions occur:failed: Asia/Ho_Chi_Minh Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960failed: Asia/Saigon Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960failed: VST Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960ERROR MESSAGES/STACK TRACES THAT OCCUR :failed: Asia/Ho_Chi_Minh Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960failed: Asia/Saigon Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960failed: VST Exception: java.lang.IllegalArgumentException: YEAR: 1959 -> 1960REPRODUCIBILITY :This bug can be reproduced always.---------- BEGIN SOURCE ----------import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Locale;import java.util.TimeZone;public class Main public static void main(String<> args) for(String tz: TimeZone.getAvailableIDs()) try test(tz);catch(Exception e) System.out.println("failed: " + tz + " Exception: " + e);public static void test(String tz) TimeZone brokenTimeZone = TimeZone.getTimeZone(tz);DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, new Locale("en"));df.setLenient(false);df.setTimeZone(brokenTimeZone);Calendar calendar = df.getCalendar();calendar.set(1959, Calendar.DECEMBER, 31, 23, 0);((SimpleDateFormat)df).set2DigitYearStart(calendar.getTime());---------- kết thúc SOURCE ----------CUSTOMER SUBMITTED WORKAROUND :Change timezone lớn another like Asia/Bangkok or rollback jre/lib/zi/Asia/Ho_Chi_Minh file to previous version before tzupdater-1.4.9-2014i was applied.
Attachments
Xem thêm: Card Raid Là Gì ? Raid 0, 1, 5, 6, 10 Dùng Để Làm Gì
Issue Linksduplicates
