Date Parsing Strangeness

I was wondering if anyone else had encountered quirks in date entry
and how you’ve handled it. For example, on the ticket Dates screen,
entering a starts date of ‘1/11/08’ will result in the date being set to null.

The problem seems to be in the underlying Time::ParseDate, which may
be buggy. I just wondered if there were any workarounds.


Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)

Does 01/11/08 have a different result? What about 2008-01-11?

Stephen Turner wrote:

At Wednesday 12/12/2007 01:39 PM, you wrote:

Does 01/11/08 have a different result? What about 2008-01-11?

A 4-digit year is handled correctly. Problems occur with a 1 or
2-digit year , or no year at all.

Actually just found I found that with 1/11/08 (or 01/11/08) the date
is set to 1/11/1908, which RT displays as ‘not set’ in the web
interface. RT (and the time parsing module) by default assumes an
’ambiguous’ year is in the past - 08 is interpreted to be 1908.

You can change the setting to assume future dates, but that would
convert ‘12/10’ to ‘12/10/08’ which might not be what you want. Also
I found that using the ‘prefer future’ setting gives seriously odd
results for some dates - ‘12/10/99’ comes out as 1963-11-03 .