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

Timestamp.valueOf() adds one hour to the timestamp for DST

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 8u281, 17
    • other-libs

      Customer report that running the following code gives incorrect result. i.e One hour is added to the timestamp while in DST.

      java.sql.Timestamp ts1 = Timestamp.valueOf("2019-03-10 02:46:18");
      //returns 2019-03-10 03:46:18
      //expected 2019-03-10 02:46:18

      Environment timezone is localtime.

            kravikumar Kiran Sidhartha Ravikumar (Inactive)
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: