MATLAB: How to update the Java Virtual Machine (JVM) to handle the Daylight Savings Time changes in 2007

2007canadacanadiandlsjavalinuxmacMATLABsavingtimezone

In 2007, the start and stop dates of Daylight Savings Time (DST) will change for the United States. The Energy Policy Act of 2005 mandates that, starting in 2007, DST will start on the second Sunday in March and end on the first Sunday in November. In 2007, the start and stop dates will be March 11 and November 4, respectively. These dates are different from previous DST start and stop dates.

Best Answer

Some MathWorks products rely on the JVM’s time-reporting features. Here is a list of what is affected:
1. Using custom Java classes (that use Java’s time features) in MATLAB
2. Instrument Control Toolbox
3. MATLAB time series objects
4. Command History Timestamps and Current Directory Filestamps
You can patch the JVM in MATLAB 7.0 (R14), 7.0.1 (R14SP1) , 7.0.4 (R14SP2), 7.1 (R14SP3) , 7.2 (R2006a) , 7.3 (R2006b) to accommodate the changes to Daylight Savings Time. See below for the steps to perform to patch the JVM.
MATLAB 6.5 (R13, R13SP1 and R13SP2) uses JVM 1.3. To obtain a patch for JVM 1.3, contact Sun Microsystems: http://java.sun.com/j2se/1.3/download.html
To patch the JVM in MATLAB 7.0 (R14) and above, perform these steps:
1. Download the JDK US DST Timezone Update Tool - 1.0 from the following Web page:
2. Extract the contents of the zip file to a directory
3. In a terminal window (e.g. a DOS window), navigate to the directory containing the now extracted tzupdater.jar file
4. Start MATLAB and execute the following command:
matlabroot
Take note of the displayed MATLAB root directory.
5. Navigate to the MATLAB root directory by executing:
cd(matlabroot)
6. Within the MATLAB root directory, navigate to the folder that contains the java executable for your particular platform and Java version. Take note of the location. The path should look like:
For Windows 32-bit : $MATLABROOT\sys\java\jre\win32\jre1.5.0\bin\
For Windows 64-bit : $MATLABROOT\sys\java\jre\win64\jre1.5.0\bin\
For Solaris : $MATLABROOT/sys/java/jre/sol2/jre1.5.0/bin/
For Linux 32 bit : $MATLABROOT/sys/java/jre/glnx86/jre1.5.0/bin/
For Linux 64 bit : $MATLABROOT/sys/java/jre/glnxa64/jre1.5.0/bin/
where $MATLABROOT is the MATLAB root directory on your machine.
7. Exit MATLAB.
8. At the terminal window, update the JVM using the appropriate command for your platform:
For Windows 32-bit : “$JAVAFOLDER\java” -jar tzupdater.jar -u -v
For Windows 64-bit : “$JAVAFOLDER\java” -jar tzupdater.jar -u -v
For Solaris : $JAVAFOLDER/java -jar tzupdater.jar -u -v
For Linux 32 bit : $JAVAFOLDER/java -jar tzupdater.jar -u -v
For Linux 64 bit : $JAVAFOLDER/java -jar tzupdater.jar -u -v
where $JAVAFOLDER is the path to the location of the java executable found in step 5. This will update the time zone data and display the update progress.
9. You can verify that the patch has been applied by using the appropriate command for your platform:
For Windows 32-bit : “$JAVAFOLDER\java” -jar tzupdater.jar -t -v
For Windows 64-bit : “$JAVAFOLDER\java” -jar tzupdater.jar -t -v
For Solaris : $JAVAFOLDER/java -jar tzupdater.jar -t -v
For Linux 32 bit : $JAVAFOLDER/java -jar tzupdater.jar -t -v
For Linux 64 bit : $JAVAFOLDER/java -jar tzupdater.jar -t -v
where $JAVAFOLDER is the path to the location of the java executable found in step 5. This will validate the update and will display a confirmation of the same.
NOTE: The patch contains a backward incompatibility. The incompatibility only affects you if you are using three letter timezones in your custom Java classes. For more information, see Sun Alert 102836:
and