Archived Forum Post

Index of archived forum posts

Question:

SFTP ignoring UtcMode for SFtpFile.LastModified

Apr 11 '13 at 10:59

I am setting the UtcMode to True on the sftp component, but regardless of the setting it is returning the LastModified timestamp as local time.

Here's the relevant part of the LastErrorText after the directory listing. The lastModifiedTime32 shown there unpacks to 2013-04-10 16:07:59 GMT. But regardless of the UtcMode setting, SFtpFile.LastModifiedTime returns it as 2013-04-10 12:07:59, which is the localized time.

If I call GetLastModifiedDt().GetAsDateTime(false), it returns the correct time, but the year is wrong as in my earlier post today about the ftp component: the year is "0413" instead of "2013"

ChilkatLog:
  ReadDir:
    DllDate: Dec 12 2012
    UnlockPrefix: ****
    Username: ****
    Architecture: Little Endian; 64-bit
    Language: .NET 4.0 / x64
    VerboseLogging: 1
    SshVersion: SSH-2.0-5.17 FlowSsh: Bitvise SSH Server (WinSSHD) 5.60
    SftpVersion: 3
    handle: 0005
    sendPacket:
      packetType: SSH_FXP_READDIR
      sendMessageInOnePacket:
        sendMessage: CHANNEL_DATA
      --sendMessageInOnePacket
    --sendPacket
    loopIdx: 1
    readChannelData_2:
      readChannelData: chan=0; tmOutMs=0; checkQ=1; onlyExt=0; skipExt=1; idleTmOutMs=0; bOneRaw=0
      genRead_1:
        packetLen: 540
        mType: CHANNEL_DATA
        payload: msgType=94; len=521
      --genRead_1
    --readChannelData_2
    packetType: SSH_FXP_NAME
...    
    DirEntry:
      filename: t123456.txt
      validFlags: 0xd
      size: 33
      permissions: 0x81b0
      octalPermissions: 100660
      type
: 1
      lastAccessTime32: 0x5165c855
      lastModifiedTime32: 0x51658e5f
    --DirEntry
...

Accepted Answer

Check to see if these new builds solve the problem:

32-bit: http://www.chilkatsoft.com/preRelease/ChilkatDotNet4.zip

64-bit: http://www.chilkatsoft.com/preRelease/ChilkatDotNet4_x64.zip