| career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (tz_update.xml)

This example Java source code file (tz_update.xml) is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

colebourne, data, ensure, finally, fourthly, iso-8859-1, jdk, joda-time, they, thirdly, this, time, updating, using

The tz_update.xml Java example source code

<?xml version="1.0" encoding="ISO-8859-1"?>


  <title>Java date and time API - Time zone update
  <author>Stephen Colebourne


<section name="Time zone updates">
Time zones are a concept driven by the political situation in each country around the world.
As such, they change frequently, and often at short notice.
In order to manage this, Joda-Time uses the internationally recognised
<a href="">tz database, which is also used
in most operating systems and the JDK itself.
Using JDK time zone data is a problem however, as the zones are only updated when the
JDK is updated. This can cause issues if you are locked into an older version of the JDK.
Joda-Time also compiles the time zone data into our jar file. However, the key difference is
that you can update the raw data and recompile the jar at any time.

<section name="Updating the time zone data">
Firstly, download the latest version of the data files from
<a href="">tz database.
Ensure you select the "Data" download which comes as a tar.gz.
Secondly, you need a <a href="download.html">source code download of Joda-Time.
Thirdly, you must take the time zone data files from step one, and replace those in the Joda-Time download.
They are located at <code>{root}/src/main/java/org/joda/time/tz/src.
Note that only <i>some of the files need to be copied across.
Fourthly, change the version number in the pom.xml file to indicate that it is a non-standard release.
Finally, recompile the Joda-Time jar file using maven.
Simply type <code>mvn package in the root directory.



Other Java examples (source code examples)

Here is a short list of links related to this Java tz_update.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.