fixed midnight problem. Thanks mbeckwell for the patch