date fields can have unsupported dates

Bug #602738 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
j.c.sackett

Bug Description

Launchpad date/datetime field does not verify that date is supported by strftime(). All dates entered by users are assumed to be sane, but OOPS-1649ED3054 shows that a user entered 1010 instead of 2010. Pages that call fmt:datetime cannot show the date:
  ValueError: year=1010 is before 1900; the datetime strftime() methods require year >= 1900

There are two options:
a) add validation to the fields to ensure we get a date we expect
b) make fmt:datetime robust to survive an insane date.

Related branches

Curtis Hovey (sinzui)
summary: - Milestones can have unsupported dates
+ date fields can have unsupported dates
Ursula Junque (ursinha)
description: updated
Revision history for this message
Gary Poster (gary) wrote :

I vote for (a) first, (b) eventually.

Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Low
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: none → 10.09
Curtis Hovey (sinzui)
Changed in launchpad-registry:
importance: Low → High
j.c.sackett (jcsackett)
Changed in launchpad-registry:
assignee: nobody → j.c.sackett (jcsackett)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
j.c.sackett (jcsackett)
Changed in launchpad-foundations:
assignee: nobody → j.c.sackett (jcsackett)
status: Triaged → Fix Committed
Changed in launchpad-registry:
status: In Progress → Fix Committed
Ursula Junque (ursinha)
Changed in launchpad-foundations:
milestone: none → 10.09
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.