Time problem with this code 
<pre><code>import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class test {

    /*
     * Calculate the difference between two date/times   * 
     * 
     */

    private static long dateDiff(Date toDate, Date fromDate) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(toDate);
        long ms = cal.getTimeInMillis();
        cal.setTime(fromDate);
        ms -= cal.getTimeInMillis();
        return ms;
    }

    public static void main(String[] args) {

        SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss");
        Date d1 = null;
        Date d2 = null;

        try {
            d1 = sdf.parse("11:00:00");
            d2 = sdf.parse("10:00:00");
        } catch (Exception e) {
            e.printStackTrace();
        }

        long result = dateDiff(d1, d2);

        Date time = new Date(result);

        System.out.println(time);
    }
}
</code></pre>

<p>When I run it I get this result :</p>

<p>Thu Jan 01 02:00:00 CET 1970</p>

<p>I would expect 1 hour difference ?! again a problem with Timezone??  </p>

<p>Any idea how I can fix it.</p>

<p>thx all</p>
