EldoS | Feel safer!

Software components for data protection, secure storage and transfer

File attributes..

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
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: 450

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



Topic viewed 656 times

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


Back to top

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

Got it!