EldoS | Feel safer!

Software components for data protection, secure storage and transfer

File attributes..

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#13276
Posted: 05/11/2010 10:03:44
by tz zones (Basic support level)
Joined: 04/28/2010
Posts: 2

Hi,
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..
Code
        Dim AListing As ArrayList
        Handle = Client.OpenDirectory("/test")
        Try
            AListing = New ArrayList
            Client.ReadDirectory(Handle, AListing)
        Finally
            Client.CloseHandle(Handle)
        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?

thx
TZ
#13277
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.

Reply

Statistics

Topic viewed 661 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!