DateFormatSymbols.java (zoneStringsDefault): Added more time zone entries.
* java/text/DateFormatSymbols.java (zoneStringsDefault): Added more time zone entries. * java/text/SimpleDateFormat.java (format): Added case for TIMEZONE_FIELD. From-SVN: r37824
This commit is contained in:
parent
48c4d691be
commit
1326d0c47d
3 changed files with 30 additions and 3 deletions
|
@ -454,7 +454,11 @@ public class SimpleDateFormat extends DateFormat
|
|||
withLeadingZeros(theCalendar.get(Calendar.HOUR)-1,p.size,buffer);
|
||||
break;
|
||||
case TIMEZONE_FIELD:
|
||||
// TODO
|
||||
TimeZone zone = theCalendar.getTimeZone();
|
||||
boolean isDST = theCalendar.get(Calendar.DST_OFFSET) != 0;
|
||||
// FIXME: XXX: This should be a localized time zone.
|
||||
String zoneID = zone.getDisplayName(isDST, p.size > 3 ? TimeZone.LONG : TimeZone.SHORT);
|
||||
buffer.append(zoneID);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("Illegal pattern character");
|
||||
|
@ -1088,7 +1092,7 @@ public class SimpleDateFormat extends DateFormat
|
|||
|
||||
/*
|
||||
case TIMEZONE_FIELD:
|
||||
// TODO
|
||||
// TODO: FIXME: XXX
|
||||
break;
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue