public static long roundToDay ( final long pTime , final TimeZone pTimeZone ) { int offset = pTimeZone . getOffset ( pTime ) ; return ( ( ( pTime + offset ) / DAY ) * DAY ) - offset ; }
Rounds the given time down to the closest day using the given timezone .