login about faq

Dear All,

A few days ago I have upgraded my FTP-client application to use the ChilKat libraries 9.5.0.59, To my surprise constructing a CTime failed until I looked what XML I got: the TAG lastModTime contains the attributes: full="20160929-100512" m="2016" d="9" y="29" hh="10" mm="5" ss="12" The attributes are used to construct the CTime, but it does like a year with 2016 month. I am using the C++ libraries with Visual Studio 2010-sp1.

Questions: 1) Is this a known issue/feature? 2) Any role for the regional settings in this issue?

kind regards Ton.

asked Sep 30 at 03:20

CenTwo's gravatar image

CenTwo
31


Thanks! Sounds like a bug to me. I'll verify and work on a fix. I'll post a new build when it's ready..

link

answered Sep 30 at 09:32

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Thanks for the Quick response,

I have downloaded the 'chilkat-9.5.0-x86-vc10-sp1.zip', installed it at the correct library location for my project and did a Batch-build->rebuild all but unfortunately, my correcting code still finds 2016 for the month. I have done a file compare upon the previous libraries and those are different. This is my code (part): if ((xmlTime = xmlFile->FindFirst ("lastModTime")) != (CXml *)NULL) { CTime t; int hh, mm, ss, d, m, y;

CAttribute *pAtt = xmlTime->m_Attributes; LOG_PRINTF((LG_DATA4, "Item Time: '%s'n", pAtt->m_strValue));

y = xmlTime->GetAttributeValue ("y"); m = xmlTime->GetAttributeValue ("m"); d = xmlTime->GetAttributeValue ("d"); hh = xmlTime->GetAttributeValue ("hh"); mm = xmlTime->GetAttributeValue ("mm"); ss = xmlTime->GetAttributeValue ("ss");

//2016sep28, V2.28.0.4, TWo: wrong planet detected ... if (m > 12) { // this cannot be a month ... int swapVal = m; m = d; // the value of Month is in the day ... d = y; // the value of Day is in the year ... y = swapVal; // the value of Year was in the month // YMD --> was --> DYM } Item->m_strDateTime.Format ("%.4d-%.2d-%.2dT%.2d:%.2d:%.2d", y, m, d, hh, mm, ss);

According to my logging: lastModTime full="20161003-095933" m="2016" d="10" y="3" hh="9" mm="59" ss="33"

Could you please re-check?

These results where with: 2016-09-30 11:51 43.831.766 ChilkatDbg.lib // time probably in gmt+1

Kind regards Ton.

link

answered Oct 03 at 04:30

CenTwo's gravatar image

CenTwo
31

I double-checked. It is correct.

link

answered Oct 03 at 13:00

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Mea culpa, I overlooked there was a additional subfolder in the path to the new libraries, when I swapped them yesterday, which resulted in the old ones being linked ... my mistake, sorry!. However, with the new (corrected) library the year is correct while the month and day are still switched.

~~ The file on the server (sorry for the name): 2016-10-03 09:59 3 blabla.txt

~~ the XML directory listing <remotedir><file> <name>blabla.txt</name><size>3</size> <lastmodtime full="20161003-095933" y="2016" d="10" m="3" hh="9" mm="59" ss="33"/> </file></remotedir>

~~ The processing of the attributes Tue Oct 04 08:25:46 2016,Item Time: '20161003-095933' Tue Oct 04 08:27:59 2016,Item Time Proc: '2016-03-10T09:59:33'

I admit, I have 'complained wrongly' yesterday ... but with current findings, there still seems to be a mixup with European and American date-formating.

Kind regards Ton.

link

answered Oct 04 at 02:58

CenTwo's gravatar image

CenTwo
31

Thanks, I was only looking at the year/month. I'll make the fix right now and will post when the new build is ready. :-)

link

answered Oct 04 at 09:12

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Dear ChilKat,

This indeed fixed it, Thank You!

Kind regards, Ton

link

answered Oct 05 at 02:08

CenTwo's gravatar image

CenTwo
31

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:

×13

Asked: Sep 30 at 03:20

Seen: 224 times

Last updated: Oct 05 at 02:08

powered by OSQA