From a fairly brief glance at the code I don't see any date arithmetic being used, so I'd suggest removing the TimeCategory and TimeDuration imports and see what happens.
From a fairly brief glance at the code I don't see any date arithmetic being used, so I'd suggest removing the TimeCategory and TimeDuration imports and see what happens.