Don't write to stdout when management command run from tests
Updated datetime objects to be aware where possible