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

Timecategory strange format (too many '-' signs) when printing 'negative' date

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.1
    • 1.7.2, 1.6.9, 1.8-beta-1
    • None
    • None
    • win 7 64-bit, 64-bit Java 1.8.0_18

    Description

      use(groovy.time.TimeCategory) {
        def first = Calendar.instance.time
        Thread.sleep 4200
        def second = Calendar.instance.time
        
        println first - second
      }
      

      When run in GroovyConsole this gives gives:

      -4.-201 seconds
      

      Attachments

        Activity

          People

            paulk Paul King
            alpheratz alpheratz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: