steve8x8 / geotoad

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

Error - Could not parse date #337

Closed FredFronky closed 8 years ago

FredFronky commented 8 years ago

Hello everyone, I have been using Geotoad for a while, and I recently decided to upgrade to the latest version. I was on Windows, and using the installer for convenience. I was warned about an old version of ruby, but continued anyway and the process errored out. The terminal was filled with errors which looked like this: *** Could not parse date: 01/11/12 - unknown language?. This was when running a simple fetch for caches within 3km of my home. I assumed it was the old version of Ruby causing issues, so I spent some time figuring out how to install a newer version. I attempted this on Linux, as it seemed easier. I have, I think, managed to build Ruby with ruby-install, and I am able to run the TUI. Unfortunately, after executing the process, I get this: output.txt

Is this an issue in the way I have installed ruby, or is it Geotoad? Thanks

steve8x8 commented 8 years ago

First question: How would you parse a date of "01/11/12"? This could be Nov 12, 2001; or Nov 1, 2012; or Jan 11, 2012; etc. Please try and use a date format that doesn't come with such ambiguities - you can set it in your geocaching.com account preferences. (Do it on an unambiguous day, so avoid May 5 and June 6.) You will probably have to throw away your cache directory (the "seek" one that contains the old pages with the ugly timestamp) - even with the new settings in place, cached files would otherwise provide confusing date formats.

Ambiguous time formats will perhaps not be supported much longer, this is a constant source of error reports :-(

Ruby 2.0 should be fine, I had been using it for a long time (but with Windows, you may have to think a bit longer about SSL certificates). If you have a recent Windows version, get the rubyinstaller for at least 2.1 - this what I'm using for my daily runs, and I cannot tell you about 2.2 and higher yet (I'd expect them to work though). Win XP is limited to 2.0 and older.

The error you are seeing is documented in Issue #335 - as one of the few non-premium members left on this world, you will no longer be able to access the "printable" cache pages using the old mapping methods. A fix is ready, and a new release will be rolled out soon. Please check Issue #335.

Another remark: You may consider replacing the "location" search with a "coord" one, this would save you a Google query (and adding the location to your environment would give you absolute distances). Time to re-read the manual page.

steve8x8 commented 8 years ago

Bug confirmed - GC had extended their list of date formats again, there are now 22, and most of them are ambiguous or exotic or both (and who would put a period at the end of the year?). I have added support for most of them, but can only cite the manual page: "ISO date style is considered safe" (this is ISO 7901 if I remember correctly). A world without imperial units would use a single, unambiguous, sortable date format...

Fixed in git, will be rolled out with 3.25.4 in a few days.

steve8x8 commented 8 years ago

3.25.4 released more than a month ago, closing.