Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-2359

Timestamps returned by Javahl are truncated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.2.x
    • unscheduled
    • bindings_javahl
    • None

    Description

      The javahl layer truncates the timestamp value returned by the native 
      subversion libraries to fit into a java.util.Date object, which cannot 
      accomodate the full timestamp value maintained by subversion. 
      
      this makes it impossible to use the timestamp information returned by the 
      javahl libraries to retrieve a particular revision by date. This behavior is 
      not consistent with the native API behavior. 
      
      example of truncation from Status.java: 
         /**
           * Returns the last date the item was changed or null
           * @return the last time the item was changed.
           * or null if not available
           */
          public Date getLastChangedDate()
          {
              if (lastChangedDate == 0)
                  return null;
              else
                  return new Date(lastChangedDate / 1000);
          }
      
      there should be a corresponding method on all classes which provide timestamp 
      information to retrieve the underlying long value. all methods which currently 
      take a Date should have corresponding methods accepting longs to specify the 
      date accurately.
      

      Original issue reported by acutright

      Attachments

        Activity

          People

            Unassigned Unassigned
            subversion-importer Subversion Importer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: