7
Tôi đang thử nghiệm thời gian Joda.Di chuyển TimeZone thành DateTimeZone
final String string_from_3rd_party = "GMT+08:00";
// Works for standard Java TimeZone!
System.out.println(TimeZone.getTimeZone(string_from_3rd_party));
// Exception in thread "main" java.lang.IllegalArgumentException: The datetime zone id is not recognised: GMT+08:00
System.out.println(DateTimeZone.forID(string_from_3rd_party));
Làm thế nào tôi có thể giữ lại string_from_3rd_party
, tuy nhiên, có khả năng xây dựng một Joda DateTimeZone
ra từ nó?
này không được tính đến tiết kiệm ánh sáng ban ngày tài khoản nếu bạn có một TimeZone với tiết kiệm ánh sáng ban ngày cấu hình – Woody