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

XMLGregorianCalendar to java.sql.Timestamp conversion

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Future Project
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: xml
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      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

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: