login about faq

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
...

asked Apr 10 '13 at 17:16

WilliamW's gravatar image

WilliamW
11446

edited Apr 10 '13 at 17:26

I originally said that GetLastModifiedDt returned the correct value. It does not--it returns the correct time, but the year is wrong (0413 instead of 2013).

(Apr 10 '13 at 17:28) WilliamW

link

answered Apr 11 '13 at 09:27

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

GetLastModifiedDt.GetAsDateTime now returns the correct value and timezone offset, so I can use that. LastModifiedTime still returns a value in the local timezone.

(Apr 11 '13 at 10:59) WilliamW
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×200
×2
×1

Asked: Apr 10 '13 at 17:16

Seen: 684 times

Last updated: Apr 11 '13 at 10:59

powered by OSQA