groovy
  1. groovy
  2. GROOVY-4971

DateGroovyMethods should have the method format(java.util.Date, String, TimeZone)

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.10
    • Fix Version/s: 1.8.3, 1.9-beta-4
    • Component/s: groovy-jdk
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      Description

      Currently there is no simple way to format a Date object within a time zone other that the system time zone.

      A possible implementation would be

      public static String format(Calendar self, String pattern, TimeZone tz)

      { SimpleDateFormat sdf = new SimpleDateFormat(pattern); sdf.setTimeZone(tz); return sdf.format(self); }

        Activity

        Hide
        Paul King added a comment -

        Method added

        Show
        Paul King added a comment - Method added
        Paul King made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Paul King [ paulk ]
        Fix Version/s 1.8.3 [ 17657 ]
        Fix Version/s 1.9-beta-4 [ 17656 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Paul King
            Reporter:
            Alexander Veit
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: