Appreciations accepted

Vladlen Litvinov, the author: If you have some job offer for me, I'm ready to discuss it. View Vladlen Litvinov's profile on LinkedIn


Friday, October 24, 2014

2014. Moscow goes back to winter

Not having found a more smart targets, we decided to return the Winter Time. So in the night of 25/26.10 Moscow will set time upon hour ago.

It is very joyful news for any Russian sysadmins which always waiting for a possibility to work in the weekends. It is the sarcasm.

My quick way for WAS admins and others.

OS update

Install the update
The update is installed without a restart.

Red Hat (CentOS), for other Linux (I don't use them) I think, the same.

Update tzdata files online, or download and install:

rpm -ivh --replacefiles tzdata-2014h-2.el5.x86_64.rpm
rpm -ivh --replacefiles tzdata-java-2014h-2.el5.x86_64.rpm 
rpm -ivh --replacefiles tzdata-java-2014h-1.el6.noarch.rpm
rpm -ivh --replacefiles tzdata-2014h-1.el6.noarch.rpm

You can run the command for checking. If the result the same - it's OK. Otherwise you'll get nothing.

zdump -v Europe/Moscow |grep 2014 

Europe/Moscow  Sat Oct 25 21:59:59 2014 UTC = Sun Oct 26 01:59:59 2014 MSK isdst=0 gmtoff=14400

Europe/Moscow  Sat Oct 25 22:00:00 2014 UTC = Sun Oct 26 01:00:00 2014 MSK isdst=0 gmtoff=10800

Oracle Java update

Unpack, stop Oracle, and run

./java -jar tzupdater.jar -u -v

java.vendor: Sun Microsystems Inc.
java.version: 1.5.0_30
JRE time zone data version: tzdata2011e
Embedded time zone data version: tzdata2014g
Extracting files... done.
Renaming directories... done.
Validating the new time zone data... done.
Time zone data update is complete.

IBM Java update

Unpack, stop all Java processes, (make executable for Linux), insert JAVA_HOME into runjtzuenv file and run runjtzu.

After that I used the second option with automatic search mode (Non-interactive mode).

You can use the small utility for checking your Java after updating (I made it using Integration Designer):

package ru.vl.checkDateTime;

import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class GetCurrentDateTime {
  public static void main(String[] args) {

       DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss zzzz Z");
       //get current date time with Date()
       Date date = new Date();

       //get current date time with Calendar()
       Calendar cal = Calendar.getInstance();


Before updating:

java -jar checkDateTime.jar

09.10.2014 12:08:06 Moscow Standard Time +0400
09.10.2014 12:08:06 Moscow Standard Time +0400


/opt/ibm/bpm8/java/jre/bin/java -jar checkDateTime.jar
09.11.2014 12:04:28 Moscow Standard Time +0300
09.11.2014 12:04:28 Moscow Standard Time +0300

/u01/app/oracle/product/jdk/jre/bin/java -jar checkDateTime.jar
09.11.2014 12:04:47 Moscow Standard Time +0300
09.11.2014 12:04:47 Moscow Standard Time +0300

It works.

No comments:

Post a Comment