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

XMLGregorianCalendar to java.sql.Timestamp conversion

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Future Project
    • P3
    • 5.0
    • 5.0
    • xml
    • generic
    • generic

    Description

      An user reported that there's no convenience method from XMLGregorianCalendar to java.sql.Timestamp. Given that Timestamp is a JDK class, perhaps we could define one more helper method like this?

      public Timestamp toTimestamp() {
        // default implementation for backward compatibility.
        // implementation can override this if it wants to make it faster.
        return new Timestamp(toGregorianCalendar().getTimeInMillis());
      }

      Attachments

        Activity

          People

            joehw Joe Wang
            kkawagucsunw Kohsuke Kawaguchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: