Java tutorial
import java.util.Date; public class PrintfExamples { public static void main(String[] args) { System.out.printf("The DATE is %tC\n", new Date()); System.out.printf("The DATE is %tz\n", new Date()); } } /* The DATE is 20 The DATE is -0800 */