码迷,mamicode.com
首页 > 其他好文 > 详细

timezone

时间:2019-07-08 14:07:18      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:form   cal   print   ring   ids   cow   rop   spl   tin   

        Calendar cal2 = Calendar.getInstance(); 
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); 
        sdf.setTimeZone(TimeZone.getTimeZone("Asia/Dubai"));
        String wsSysTime2  = sdf.format(cal2.getTime());
        System.out.println("END   TIME ..." + wsSysTime2);  
        
        
        System.out.println(java.util.TimeZone.getDefault().getID());
        
        TimeZone tz = TimeZone.getTimeZone("Poland"); 
        
        for(String str: tz.getAvailableIDs()){
            System.out.println(str);
        }
        System.out.println(tz.getID());
        System.out.println(tz.getDSTSavings());
        System.out.println(tz.getDisplayName());
        System.out.println(tz);
        
        System.out.println(TimeZone.getTimeZone("Europe/London").useDaylightTime());
        System.out.println(TimeZone.getTimeZone("Asia/Dubai").useDaylightTime());
        System.out.println(TimeZone.getTimeZone("Asia/Bahrain").useDaylightTime());
        System.out.println(TimeZone.getTimeZone("Poland").useDaylightTime());
        System.out.println(TimeZone.getTimeZone("Europe/Moscow").useDaylightTime()); 
    }

 

timezone

标签:form   cal   print   ring   ids   cow   rop   spl   tin   

原文地址:https://www.cnblogs.com/kakaisgood/p/11150422.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!