MDTM, Time Zones, and Serv-U FTP Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pete
    Fanatic
    • Nov 2007
    • 190

    MDTM, Time Zones, and Serv-U FTP Server

    I'm creating a new topic about MDTM because I couldn't determine if my issue is the same as Dax's or not.

    I'm using BC 2.4.1 but the problem might have also existed in v2.4.

    My problem is that when BC uses the MDTM to set the file timestamp on the server, it's specifying the source file's time in local time in the MDTM command instead of converting it to UTC time that Serv-U expects.

    For example, both my computer and the FTP server are in the same time zone: UTC - 4 hours. If the local timestamp is yyyymmdd12mmss, BC sends this without modification and Serv-U (expecting UTC time) sets the file timestamp on the server to four hours in the past (yyyymmdd08mmss) because Serv-U automatically converts the specified time from UTC to local time by subtracting four hours from it (in my case).

    In addition to having incorrect timestamps on the server, this also means that BC's folder view continues to show these files as different until I manually touch the local files. Note that touching the files on the server also does not work probably for the same reason that uploading files does not work.

    I would like to ask that when BC realizes that it's working with a Serv-U server or perhaps when it sees the following in the FEAT list: "Recv> MDTM YYYYMMDDHHMMSS[+-TZ];filename", that BC will change the MDTM command to either (1) add the UTC offset to the end of the specified timestamp (e.g. yyyymmdd12mmss-240) (240 is 4 hours specified in minutes), or (2) convert the timestamp to UTC before issuing the MDTM command.

    I remember that I posted a similar request in the forums about two years ago and BC was changed to handle this. It worked perfectly for about two years but it has stopped working recently.

    For your reference, here are some of the lines from my log window:
    Code:
    04-10-2006 03:24:01  Recv> 220 Serv-U FTP Server v6.2 for WinSock ready...
    04-10-2006 03:24:01  Sent> FEAT
    04-10-2006 03:24:01  Recv> 211-Extension supported
    04-10-2006 03:24:01  Recv>  CLNT
    04-10-2006 03:24:01  Recv>  MDTM
    04-10-2006 03:24:01  Recv>  MDTM YYYYMMDDHHMMSS[+-TZ];filename
    04-10-2006 03:24:01  Recv>  SIZE
    04-10-2006 03:24:01  Recv>  SITE PSWD;EXEC;SET;INDEX;ZONE;CHMOD;MSG
    04-10-2006 03:24:01  Recv>  REST STREAM
    04-10-2006 03:24:01  Recv>  XCRC filename;start;end
    04-10-2006 03:24:01  Recv>  MODE Z
    04-10-2006 03:24:01  Recv>  MLST Type*;Size*;Create;Modify*;Win32.ea*;
    04-10-2006 03:24:01  Recv> 211 End
    04-10-2006 03:24:01  Stat> Detected Server Software: Serv-U 5.x/6.x
    04-10-2006 03:24:15  Sent> STOR New Text Document.txt
    04-10-2006 03:24:15  Recv> 150 Opening ASCII mode data connection for
                               New Text Document.txt.
    04-10-2006 03:24:15  Stat> 20 bytes transferred. (N/A/s) (0 ms)
    04-10-2006 03:24:15  Recv> 226 Transfer complete.
    04-10-2006 03:24:15  Sent> MDTM 20060410020139 New Text Document.txt
    04-10-2006 03:24:15  Recv> 253 Date/time changed okay.
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Re: MDTM, Time Zones, and Serv-U FTP Server

    Thank you for reporting the problem. It looks like BC with the Indy 9 FTP library is handling this correctly, but SmartFTP isn't. The MDTM YYYYMMDDHHMMSS[+-TZ] means send in local time with a time zone adjustment, and BC with SmartFTP was sending in local time but without the timezone adjustment.

    For now, the solution is to switch to Indy 9 in the FTP>Advanced section of Tools|Options.

    We'll get this behavior fixed for our next release.
    Chris K Scooter Software

    Comment

    • Pete
      Fanatic
      • Nov 2007
      • 190

      #3
      Re: MDTM, Time Zones, and Serv-U FTP Server

      Thanks, Chris.

      Comment

      Working...