prevent npe
Uses now time zone of user for getting end of day instead of using deprecated JDK 1.1 methods.