1 Reply Latest reply on Apr 6, 2007 8:53 PM by 807599

    FTP file timestamp/Calendar getTimeInMiilis() off by one year...


      My apologies if this doesn't belong here, but I'm not sure where to file it. I'm using the Apache commons library to do FTP transfers. When I pull a file down, I try to set the last-modified timestamp using:
      private static void setTimeStamp(FTPFile file, File localFile) {
      However, it seems to be setting the timestamp incorrectly; the year is off by one.

      I can compensate for it by adding one to the calendar object, but I wanted to ask here to see if anyone can explain it to me in more detail... perhaps I am misunderstanding something fundamental about the Calendar class or something?