coralnet icon indicating copy to clipboard operation
coralnet copied to clipboard

Ensure that metadata edit/upload tolerate the same dates as metadata displays

Open StephenChan opened this issue 4 years ago • 0 comments

year=1010 is before 1900; the datetime strftime() methods require year >= 1900

This happened on the Annotation Tool and Image Details page for an image whose date metadata was entered as the year 1010. Apparently, either Edit Metadata or Upload Metadata happily accepts that year, but internal server errors happen if you then try to view the image on the Image Details page or the Annotation Tool page. Both pages format the date into a readable string like '2020-06-13', so I assume that's where it's tripping up.

Apparently 1010 should be fine once we update to Python 3.3 or higher, since strftime() was improved to accept more years. Still, a similar problem could remain if Edit/Upload Metadata are too lenient and accept negative years or something.

StephenChan avatar Jun 14 '20 08:06 StephenChan