diff options
author | warrenl <warrenl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-28 20:11:46 +0000 |
---|---|---|
committer | warrenl <warrenl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-28 20:11:46 +0000 |
commit | e3088a0fd0f0cae2b85ef264756e9bb1056f0410 (patch) | |
tree | 35d2e62ad822dbf670d94c3606784d42b14e4485 /libjava/java/text/SimpleDateFormat.java | |
parent | 76c229ff4d37b70218b89ec957282a808dd7677b (diff) | |
download | ppe42-gcc-e3088a0fd0f0cae2b85ef264756e9bb1056f0410.tar.gz ppe42-gcc-e3088a0fd0f0cae2b85ef264756e9bb1056f0410.zip |
* java/text/DateFormatSymbols.java (zoneStringsDefault): Added
more time zone entries.
* java/text/SimpleDateFormat.java (format): Added case for
TIMEZONE_FIELD.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37824 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/text/SimpleDateFormat.java')
-rw-r--r-- | libjava/java/text/SimpleDateFormat.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libjava/java/text/SimpleDateFormat.java b/libjava/java/text/SimpleDateFormat.java index e2f70cddcc6..c0332bf71d8 100644 --- a/libjava/java/text/SimpleDateFormat.java +++ b/libjava/java/text/SimpleDateFormat.java @@ -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; */ |