Commons Net
  1. Commons Net
  2. NET-461

getTimestamp() return is different by same file in windows and linux

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not a Problem
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: FTP
    • Environment:

      Linux and Windows

      Description

      When using "listFiles" in FTPClient, I have found getTimestamp() return is different in windows and linux.
      For example,The file last modified time is 2012-04-24 15:10:40 (GMT +8:00) both in linux and windows, getTimestamp return is "Tue Apr 24 15:10:00 CST 2012" in windows, but return "Tue Apr 24 07:10:00 CST 2012" in linux。

      Detail:
      My Code is:
      FTPClient client = new FTPClient();
      client.connect("...", 21);
      client.login("******", "********");
      FTPFile[] files = client.listFiles();

      for (int i = 0; i < files.length; i++)

      { FTPFile ftpFile = files[i]; System.out.println(ftpFile.getTimestamp().getTime()); }

      Code print:
      Windows:
      Tue Apr 24 15:10:00 CST 2012

      Linux:
      Tue Apr 24 07:10:00 CST 2012

      getTimestamp() return all is same but hour information is different。

      Thanks

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Junsheng Chen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 672h
              672h
              Remaining:
              Remaining Estimate - 672h
              672h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development