login about faq

I am currently evaluating Chilkat SFTP for one of my products. I see a glaring bug in CkDateTime. I have a file on the FTP server whose file stamp as shown in FileZilla is 1/29/2013 11:53:51 AM

However converting to .GetAsDateTime(true) or .GetAsDateTime(false) gives absurd value as below

1/29/0413 11:53:51 AM

Basically I need to get it as 1/29/2013 11:53:51 AM

Where is it messing up? Is there a workaround for the bug?

asked Jan 29 '13 at 14:47

lavanyadeepak's gravatar image

lavanyadeepak
1334

edited Jan 29 '13 at 17:25

chilkat's gravatar image

chilkat ♦♦
11.8k316358421


                    SFtp objSFtp = new SFtp();
                objSFtp.UnlockComponent(strFtpUnlocker);

                if (objSFtp.Connect(strServer, intPort))
                {
                    if (objSFtp.AuthenticatePw(strUsername, strPassword))
                    {
                        if (objSFtp.InitializeSftp())
                        {
                            string strHomeDirectoryHandle = objSFtp.OpenDir(strFtpHomeDirectory);
                            if (strHomeDirectoryHandle != null)
                            {
                                SFtpDir objFtpDirectoryListing = objSFtp.ReadDir(strHomeDirectoryHandle);
                                if (objFtpDirectoryListing != null)
                                {
                                    int intNumberOfFilesAndFolders = objFtpDirectoryListing.NumFilesAndDirs;

                                    if (intNumberOfFilesAndFolders.Equals(Decimal.Zero))
                                    {
                                        //No files (do something)
                                    }
                                    else
                                    {
                                        for (int intFileCount = 0; intFileCount < intNumberOfFilesAndFolders; intFileCount++)
                                        {
                                            SFtpFile objFileHandle = objFtpDirectoryListing.GetFileObject(intFileCount);

                                            string strFileName = objFileHandle.Filename;

                                                Console.WriteLine (DateTime.Now);  //2013

                                                CkDateTime dtRemoteTime = objSFtp.GetFileLastModifiedDt(strFileName, false, false); //0413

                                             }
                                        }
                                   }

                                   objSFtp.CloseHandle(strHomeDirectoryHandle);
                                }
                        }
                    }
                    objSFtp.Disconnect();
               }

           objSFtp = null;
link

answered Jan 29 '13 at 16:27

lavanyadeepak's gravatar image

lavanyadeepak
1334

I verified the problem (i.e. reproduced it) and I am working on a solution.

(Jan 29 '13 at 17:26) chilkat ♦♦

Here's a new build that should fix the problem:

http://www.chilkatsoft.com/preRelease/ChilkatDotNet2.zip

If you need something other than the 32-bit .NET 2.0/3.5 Framework build, please let me know.

link

answered Jan 29 '13 at 20:07

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

I tried using your download and I am encountering the following exception:

The details are :Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

Actually the version which I originally downloaded was ChilkatDotNet4-9.4.0-win32.msi and this one had the DLL size of ChilkatDotNet4.dll as 6109 KB. The one you had given as a bug fix is: ChilkatDotNet2.dll which is of file size 6228 KB.

link

answered Jan 30 '13 at 08:52

lavanyadeepak's gravatar image

lavanyadeepak
1334

Here's the new build for the 4.0 Framework:

http://www.chilkatsoft.com/preRelease/ChilkatDotNet4.zip

link

answered Jan 30 '13 at 09:40

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

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:

×201
×98

Asked: Jan 29 '13 at 14:47

Seen: 1,592 times

Last updated: Jan 30 '13 at 09:40

powered by OSQA