[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: time zone fix

Kaffe CVS cvs-commits at kaffe.org
Sat Feb 19 09:34:20 PST 2005


PatchSet 5572 
Date: 2005/02/19 17:26:44
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: time zone fix

2005-02-19  Dalibor Topic  <robilad at kaffe.org>

Resynced with GNU Classpath.

2005-02-18  Sven de Marothy <sven at physto.se>

* java/util/TimeZone.java,
(getDefaultDisplayName): Don't print zero offsets.

Members: 
	ChangeLog:1.3616->1.3617 
	libraries/javalib/java/util/TimeZone.java:1.22->1.23 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3616 kaffe/ChangeLog:1.3617
--- kaffe/ChangeLog:1.3616	Sat Feb 19 17:11:55 2005
+++ kaffe/ChangeLog	Sat Feb 19 17:26:44 2005
@@ -2,6 +2,15 @@
 
 	Resynced with GNU Classpath.
 	
+	2005-02-18  Sven de Marothy <sven at physto.se>
+
+	* java/util/TimeZone.java,
+	(getDefaultDisplayName): Don't print zero offsets.
+	
+2005-02-19  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+	
 	2005-02-18  Robert Schuster <thebohemian at gmx.net>
 
 	* java/nio/charset/Charset.java (forName): Throws
Index: kaffe/libraries/javalib/java/util/TimeZone.java
diff -u kaffe/libraries/javalib/java/util/TimeZone.java:1.22 kaffe/libraries/javalib/java/util/TimeZone.java:1.23
--- kaffe/libraries/javalib/java/util/TimeZone.java:1.22	Sat Jan 22 19:18:51 2005
+++ kaffe/libraries/javalib/java/util/TimeZone.java	Sat Feb 19 17:26:46 2005
@@ -1107,15 +1107,21 @@
 
     StringBuffer sb = new StringBuffer(9);
     sb.append("GMT");
-    sb.append(offset >= 0 ? '+' : '-');
 
     offset = Math.abs(offset) / (1000 * 60);
     int hours = offset / 60;
     int minutes = offset % 60;
 
-    sb.append((char) ('0' + hours / 10)).append((char) ('0' + hours % 10));
-    sb.append(':');
-    sb.append((char) ('0' + minutes / 10)).append((char) ('0' + minutes % 10));
+    if (minutes != 0 || hours != 0)
+      {
+	sb.append(offset >= 0 ? '+' : '-');
+	sb.append((char) ('0' + hours / 10));
+	sb.append((char) ('0' + hours % 10));
+	sb.append(':');
+	sb.append((char) ('0' + minutes / 10));
+	sb.append((char) ('0' + minutes % 10));
+      }
+
     return sb.toString();
   }
 




More information about the kaffe mailing list