What is the default timezone for java.util.Calendar.?

后端 未结 4 999
一整个雨季
一整个雨季 2021-02-09 16:26

Code

public String testDate(){ 
      TimeZone.setDefault(TimeZone.getTimeZone(\"US/Eastern\"));
      Calendar fromDate = Calendar.getInstance(         


        
4条回答
  •  情话喂你
    2021-02-09 16:49

    The date itself doesn't have any time zone. It's toString() method uses the current default time zone to return a String

提交回复
热议问题