gcc/libjava/java/util/TimeZone.h
Jakub Jelinek b3502aa8d4 re PR libgcj/17002 (java.util.TimeZone.getDefault() is broken)
libjava/
	PR libgcj/17002
	PR classpath/28550
	* java/util/VMTimeZone.java (getDefaultTimeZoneId): To read
	/etc/localtime, use ZoneInfo.readTZFile instead of
	VMTimeZone.readtzFile.  Get better timezone name for /etc/localtime,
	either if it is a symlink or through /etc/sysconfig/clock.
	(readSysconfigClockFile): New static method.
	(readtzFile): Removed.
	* java/lang/System.java: Add gnu.java.util.zoneinfo.dir to comments.
	* posix.cc (_Jv_platform_initProperties): Set
	gnu.java.util.zoneinfo.dir.
	* sources.am (gnu_java_util_source_files): Add
	classpath/gnu/java/util/ZoneInfo.java.
	* Makefile.in: Regenerated.
	* java/util/VMTimeZone.h: Regenerated.
	* java/util/TimeZone.h: Regenerated.
	* gnu/java/util/ZoneInfo.h: Generated.
libjava/classpath/
	* java/util/Date.java (parse): Properly parse 09:01:02 as
	hours/minutes/seconds, not as hours/minutes/year.
	* java/util/SimpleTimeZone.java (SimpleTimeZone): Simplify
	{start,end}TimeMode constructor by calling shorter constructor,
	set {start,end}TimeMode fields after it returns.
	(setStartRule): Don't adjust startTime into WALL_TIME.  Set
	startTimeMode to WALL_TIME.
	(endStartRule): Similarly.
	(getOffset): Handle properly millis + dstOffset overflowing into the
	next day.  Adjust startTime resp. endTime based on startTimeMode
	resp. endTimeMode.
	* java/util/TimeZone.java (zoneinfo_dir, availableIDs, aliases0): New
	static fields.
	(timezones): Remove synchronized keyword.  Set zoneinfo_dir.
	If non-null, set up aliases0 and don't put anything into
	timezones0.
	(defaultZone): Call getTimeZone instead of timezones().get.
	(getDefaultTimeZone): Fix parsing of EST5 or EST5EDT6.  Use
	getTimeZoneInternal instead of timezones().get.
	(parseTime): Parse correctly hour:minute.
	(getTimeZoneInternal): New private method.
	(getTimeZone): Do the custom ID checking first, canonicalize
	ID for custom IDs as required by documentation.  Call
	getTimeZoneInternal to handle the rest.
	(getAvailableIDs(int)): Add locking.  Handle zoneinfo_dir != null.
	(getAvailableIDs(File,String,ArrayList)): New private method.
	(getAvailableIDs()): Add locking.  Handle zoneinfo_dir != null.
	* gnu/java/util/ZoneInfo.java: New file.

From-SVN: r122229
2007-02-22 17:04:55 +01:00

71 lines
2.5 KiB
C++

// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TimeZone__
#define __java_util_TimeZone__
#pragma interface
#include <java/lang/Object.h>
#include <gcj/array.h>
class java::util::TimeZone : public ::java::lang::Object
{
public:
TimeZone();
private:
static ::java::util::TimeZone * defaultZone();
public: // actually package-private
static ::java::util::HashMap * timezones();
static ::java::util::TimeZone * getDefaultTimeZone(::java::lang::String *);
private:
static JArray< jint > * getDateParams(::java::lang::String *);
static jint parseTime(::java::lang::String *);
public:
virtual jint getOffset(jint, jint, jint, jint, jint, jint) = 0;
virtual jint getOffset(jlong);
virtual jint getRawOffset() = 0;
virtual void setRawOffset(jint) = 0;
virtual ::java::lang::String * getID();
virtual void setID(::java::lang::String *);
virtual ::java::lang::String * getDisplayName();
virtual ::java::lang::String * getDisplayName(::java::util::Locale *);
virtual ::java::lang::String * getDisplayName(jboolean, jint);
virtual ::java::lang::String * getDisplayName(jboolean, jint, ::java::util::Locale *);
private:
::java::lang::String * getDefaultDisplayName(jboolean);
public:
virtual jboolean useDaylightTime() = 0;
virtual jboolean inDaylightTime(::java::util::Date *) = 0;
virtual jint getDSTSavings();
private:
static ::java::util::TimeZone * getTimeZoneInternal(::java::lang::String *);
public:
static ::java::util::TimeZone * getTimeZone(::java::lang::String *);
static JArray< ::java::lang::String * > * getAvailableIDs(jint);
private:
static jint getAvailableIDs(::java::io::File *, ::java::lang::String *, ::java::util::ArrayList *);
public:
static JArray< ::java::lang::String * > * getAvailableIDs();
static ::java::util::TimeZone * getDefault();
static void setDefault(::java::util::TimeZone *);
virtual jboolean hasSameRules(::java::util::TimeZone *);
virtual ::java::lang::Object * clone();
static const jint SHORT = 0;
static const jint LONG = 1;
private:
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) ID;
static ::java::util::TimeZone * defaultZone0;
static const jlong serialVersionUID = 3581463369166924961LL;
static ::java::lang::String * zoneinfo_dir;
static JArray< ::java::lang::String * > * availableIDs;
static ::java::util::HashMap * aliases0;
static ::java::util::HashMap * timezones0;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TimeZone__