public static String fromUnixtime(long unixtime, String format, TimeZone tz) {
		SimpleDateFormat formatter = FORMATTER_CACHE.get(format);
		formatter.setTimeZone(tz);
		Date date = new Date(unixtime * 1000);
		try {
			return formatter.format(date);
		} catch (Exception e) {
			LOG.error("Exception when formatting.", e);
			return null;
		}
	}
public static String fromUnixtime ( long unixtime , String format , TimeZone tz ) { SimpleDateFormat formatter = FORMATTER_CACHE . get ( format ) ; formatter . setTimeZone ( tz ) ; Date date = new Date ( unixtime * 1000 ) ; try { return formatter . format ( date ) ; } catch ( Exception e ) { LOG . error ( "Exception when formatting." , e ) ; return null ; } }
Convert unix timestamp (seconds since '1970-01-01 00:00:00' UTC) to datetime string
in the given format.