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

Date.toString() gives incorrect, GMT time

XMLWordPrintable

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



      Name: dbT83986 Date: 02/10/99


      bernardv@guadalajara[720]: uname -a
      SunOS guadalajara 5.5.1 Generic_103640-04 sun4u sparc SUNW,Ultra-1

      csh
      echo $LANG -> C
      echo $TZ -> MET

      java code:
      System.out.println((new Date()).toString());

      result:
      Fri Aug 21 17:05:29 GMT+04:30 1998

      while shell # date gives:
      Fri Aug 21 14:36:02 MET DST 1998

      the difference is +2:30 hours; it should be
      -2:00 hours right now in summer.
      (Review ID: 37437)
      ======================================================================

            okutsu Masayoshi Okutsu
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: