fixed the time/datetime comparison bug. hopefully this thin will never happend again...

Signed-off-by: Alexander Skjolden <alex@plastboks.net>