privatestaticint test(String timeZoneID) throws Throwable {
File f = new File("test-timezone.txt"); int failures = 0; try {
f.createNewFile();
if (timeZoneID != null) {
TimeZone.setDefault(TimeZone.getTimeZone(timeZoneID));
}
boolean succeeded = f.setLastModified(TIME); if (!succeeded) {
System.err.format
("Setting time to %d failed for time zone %s%n",
TIME, timeZoneID);
failures++;
}
long time = f.lastModified(); if (Math.abs(time - TIME) > 999) { // account for second precision
System.err.format
("Wrong modification time (ms): expected %d, obtained %d%n",
TIME, time);
failures++;
}
} finally {
f.delete();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.