Groovy
  1. Groovy
  2. GROOVY-4971

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

    Details

    • Type: Improvement Improvement
    • Status: 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
    • Flags:
      Patch

      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

        Alexander Veit created issue -
        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
        Resolution Fixed [ 1 ]
        Fix Version/s 1.8.3 [ 17657 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.9-beta-4 [ 17656 ]
        Assignee Paul King [ paulk ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12733897 ] Default workflow, editable Closed status [ 12745694 ]
        Mark Thomas made changes -
        Flags Patch [ 10430 ]
        Patch Submitted Yes [ 10763 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971428 ] Default workflow, editable Closed status [ 12979205 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        34d 16h 21m 1 Paul King 15/Sep/11 07:52
        Resolved Resolved Closed Closed
        28d 17h 35m 1 Paul King 14/Oct/11 01:28

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development