static public String getFormattedDateTime ( long dt , TimeZone tz , String format ) { SimpleDateFormat df = new SimpleDateFormat ( format ) ; if ( tz != null ) df . setTimeZone ( tz ) ; return df . format ( new Date ( dt ) ) ; }
Returns the given date time formatted using the given format and timezone .