Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4209067

Regional settings in NT incorrectly affected date and time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.6
    • core-libs



      Name: gsC80088 Date: 02/04/99


      In Japanese NT, build a small Java code:

      import java.util.Locale;
      import java.util.*;

      public class testtime{

          public static void main(String args[]) {
           Date d1 = new Date();
      System.out.println("here date:\t"+d1);
              
          }
      }

      1)In Japanese NT, set:
      Control panel ->"Reginal Setting"->"Japanese"

      The above program output:
      here date: Wed Oct 28 00:38:37 JST 1998

      2)In Japanese NT, set:
      Control panel ->"Reginal Setting"->"English(US)"

      The above program output:
      here date: Tue Oct 28 07:38:37 PST 1998

      3) But the desktop time is: 10/28/1998 10:38:37 AM!!!!

      It seem like always Java VM take time from mechine
      and convert them to default locale timezone and DO
      NOT care the really mechine setting! That is mean if
      a user design Java code in US and use Japanese NT as
      design platform, he/she will always get Japanese
      time as default! Even his/her PC is in EST or PST.

      I think it is really unfair and big bug.
      (Review ID: 41306)
      ======================================================================

            okutsu Masayoshi Okutsu
            gstone Greg Stone
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: