Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3687

TimeCategory 10.minutes.ago zeros out the time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.4
    • 1.6.5, 1.7-beta-2
    • None
    • None

    Description

      import org.codehaus.groovy.runtime.TimeCategory
      use ( TimeCategory ) {
         println 10.minutes.ago.format('yyyyMMdd HH:mm:ss')
      }
      

      Prints: 20090818 00:00:00 <- Note that the time component has been reset to zero. Conversely, 10.minutes.from.now works as expected.

      I'll try to look into this but I've left it unassigned for now. I'm not sure if someone else could resolve this more quickly than I could.

      Attachments

        1. timedurationpatch.diff
          0.9 kB
          Tim Yates

        Activity

          People

            tomstrummer Tom Nichols
            tomstrummer Tom Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: