EldoS | Feel safer!

Software components for data protection, secure storage and transfer

File attributes..

Posted: 05/11/2010 10:03:44
by tz zones (Basic support level)
Joined: 04/28/2010
Posts: 2

I am usign the SFTP client to connect to the remote UNIX client and trying to list all files in a specific remote directory. I have the FOR LOOP just as below..
        Dim AListing As ArrayList
        Handle = Client.OpenDirectory("/test")
            AListing = New ArrayList
            Client.ReadDirectory(Handle, AListing)
        End Try

        For i = 0 To AListing.Count - 1
            With CType(AListing(i), TElSftpFileInfo)
               If .Attributes.FileType = TSBSftpFileType.ftFile Then
                    Console.WriteLine(.Name & "  " & .Attributes.MTime)
               End If
            End With
        Next i

My issue is that, since I live in US central time and the Attributes.MTime is not actaully picking the modified time on the file, instead it is off by several hours. How to change it to display the US central time?

Posted: 05/11/2010 10:34:45
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 442

Hi. According to SFTP specification, all times are represented in UTC, so you need to add timezone difference.



Topic viewed 742 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!