|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbr.blog.chester.timefix.Timefix
public class Timefix
Allows Java environments to adjust their default TimeZone settings to accomodate changes such as Daylight Savivings Time updates.
This ajust can be made on the aplication itself (by calling the
fixTimeZone() method), or by inserting the class on the
application startup script (it will adjust the timezone and call the "real"
startup class).
The latter method is very useful for deployers that don't have access to the application source code.
The hard work of reading the timezone info from the default UNIX location/format is done by Stuart D. Gathman's Java implementation of the "tz" package. It is distributed along with this code for convenience only, but it's official home is at http://www.bmsi.com/java/#TZ .
ZoneInfo| Constructor Summary | |
|---|---|
Timefix()
|
|
| Method Summary | |
|---|---|
static void |
fixTimeZone()
Adjusts the JVM's default timezone to our custom timezone. |
static void |
main(java.lang.String[] args)
Adjusts the timezone and calls the main method from a
class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Timefix()
| Method Detail |
|---|
public static void fixTimeZone()
throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
throws java.lang.Throwable
main method from a
class.
The first received parameter is the name of the class. In practice, this method (combined with the timefix class on the default package) allows an administrator to replace:
java MyMainClass param1 param2 param3
with
java timefix MyMainClass param1 param2 param3
to solve timezone problems (such as DST changes) without access to the source code
args - name of the original main class, followed by its arguments
java.lang.Throwable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||