package Date;
import java.util.Arrays;
import java.util.GregorianCalendar;
import java.util.TimeZone;
public class GregorianCalendarDemo {
/**
* @param args
*/
public static void main(String[] args) {
//时区
String[] allTz = TimeZone.getAvailableIDs();
Arrays.sort(allTz);
for (int i = 0; i < allTz.length; i++) {
System.out.println(allTz[i]);
}
TimeZone tz = TimeZone.getTimeZone("America/New_York"); //区号和语言
GregorianCalendar gc = new GregorianCalendar(tz);
System.out.println("纽约时间为:" + String.format("%tF %
}
}
阅读(710) | 评论(0) | 转发(0) |