steve8x8 / geotoad

Geocaching query tool written in Ruby
https://buymeacoffee.com/steve8x8
Other
28 stars 8 forks source link

Time parsing problem (dd MMM yy format) #300

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have updated to the latest svn version today an now I get the following error.

Here is the debug output:
D: parsing date: [11 Feb 14]
D: Timestamp parsed as 2014-02-11 00:00:00 +0100
 ***  Could not convert timestamp '' to Time object.
D: ctime= cdays=

This is my commandline command:
geotoad.rb --delimiter='|' --distanceMax=10 --format=gpx 
--output='/home/pat/tmp/' --placeDateExclude=0 --placeDateInclude=31 
--queryType=wid GC4YE0Q

Any ideas what I do wrong?

Original issue reported on code.google.com by law.sky...@gmail.com on 7 Mar 2014 at 9:03

GoogleCodeExporter commented 9 years ago
Can you show the following (non-debug) lines:

( o ) Login successful
( o ) Querying user preferences
( - ) Using date format ...

As a workaround, switch to another, less ambiguous, date format like MM/dd/yyyy 
- I will look into this though.

Original comment by Steve8x8 on 7 Mar 2014 at 11:50

GoogleCodeExporter commented 9 years ago
Bug identified.
If you had looked above the final error, you might have noticed a
D: parsing date: [11]
 ***  Could not parse date: 11
- which happened during analysis of the cache_details page, and was the real 
cause of the problem (as information parsed from the cache details page usually 
won't be overwritten when parsing the cdpf printable page).
This bug indeed only shows up when a date format containing spaces is used - 
did you change your preferences lately? If so, every GeoToad version would have 
failed, not only the SVN head.

If you can use the "patch" utility (or apply the change by hand), please see 
the attached file. I will run some more tests before committing the fix.

Original comment by Steve8x8 on 7 Mar 2014 at 4:51

Attachments:

GoogleCodeExporter commented 9 years ago
I have applied the patch an now I don't get any errors anymore. 

Thanks for the quick fix.

Original comment by law.sky...@gmail.com on 7 Mar 2014 at 5:29

GoogleCodeExporter commented 9 years ago
The corresponding patch has been merged, and the bugfix committed to SVN for 
the next release.

Original comment by Steve8x8 on 13 Mar 2014 at 8:20

GoogleCodeExporter commented 9 years ago
Rolled out with 3.20.2

Original comment by Steve8x8 on 24 Mar 2014 at 2:39