這期內(nèi)容當(dāng)中小編將會給大家?guī)碛嘘P(guān)怎么在java中將時區(qū)轉(zhuǎn)換為夏令時,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
Java是一門面向?qū)ο缶幊陶Z言,可以編寫桌面應(yīng)用程序、Web應(yīng)用程序、分布式系統(tǒng)和嵌入式系統(tǒng)應(yīng)用程序。
一.準(zhǔn)備知識
1.America/New_York的夏令時時間如下: 包左不包右
2016-3-13, 02:00:00到2016-11-6, 02:00:00
2017-3-12, 02:00:00到2017-11-5, 02:00:00
2.三字母時區(qū) ID
為了與 JDK 1.1.x 兼容,一些三字母時區(qū) ID(比如 "PST"、"CTT"、"AST")也受支持。
但是,它們的使用被廢棄,這是因為相同的縮寫經(jīng)常用于多個時區(qū)
例如 CST:有4個意思,美國,澳大利亞,中國,古巴時間
3.標(biāo)準(zhǔn)
GMT:Green Mean Time格林威治標(biāo)準(zhǔn)時間,1960年前被作為標(biāo)準(zhǔn)時間參考 GMT+12-->GMT-12
java8的范圍為GMT+18-->GMT-18
UTC:Coordinated Universal Time 時間協(xié)調(diào)世界時間 ,比GMT精確,在1972年1月1日成為新的標(biāo)準(zhǔn);UTC,UTC+1,UTC+2...UTC+12,UTC-12...UTC-1
java8的范圍 UTC-18-->UTC+18
DST:Daylight Saving Time 夏令時間,指在夏天的時候,將時鐘撥快一個小時,以提早日光的使用,在英國稱為夏令時間;
目前有110多個國家采用夏令時;
在中國,從1986-1992只實行了6年,之后就取消了;原因如下:
1.中國東西方向跨度很大,而且采用的是統(tǒng)一的東八區(qū),采用夏令時無法兼容東西部;
2.高緯度地區(qū),冬夏晝夜時間變化大;意義不大;
4.表示東八區(qū)可以用 : GMT+8或者Etc/GMT-8(剛好相反,為什么呢,因為php開發(fā)者認為,東八區(qū)比標(biāo)準(zhǔn)時間快8小時,應(yīng)該減去8小時,于是表示成了這樣。參考的對象不同導(dǎo)致了不同的表示方法;)
5. 中國時區(qū)的表示方式
GMT+8
UTC+8
Asia/Harbin 哈爾濱 //中國標(biāo)準(zhǔn)時間
Asia/Chongqing 重慶//中國標(biāo)準(zhǔn)時間
Asia/Chungking 重慶//中國標(biāo)準(zhǔn)時間
Asia/Urumqi 烏魯木齊//中國標(biāo)準(zhǔn)時間
Asia/Shanghai 上海(東8區(qū))//中國標(biāo)準(zhǔn)時間
PRC
Asia/Macao 澳門 //中國標(biāo)準(zhǔn)時間
Hongkong 香港 //香港時間跟中國標(biāo)準(zhǔn)時間一致
Asia/Hong_Kong 香港
Asia/Taipei 臺北(臺灣的) //中國標(biāo)準(zhǔn)時間
新加坡跟中國的時間一樣;
Asia/Singapore
Singapore
6. 標(biāo)準(zhǔn)時區(qū)的表示
UTC
UTC+0
UTC-0
GMT 格林尼治標(biāo)準(zhǔn)時間
GMT0 格林尼治標(biāo)準(zhǔn)時間
Etc/GMT 格林尼治標(biāo)準(zhǔn)時間
Etc/GMT+0 格林尼治標(biāo)準(zhǔn)時間
Etc/GMT-0 格林尼治標(biāo)準(zhǔn)時間
Etc/GMT0 格林尼治標(biāo)準(zhǔn)時間
注意:GMT+xx(-xx)有很大的包容性,還可以自動的識別各種時間的表示
二. 時區(qū)轉(zhuǎn)換
環(huán)境:java8之前
1.將當(dāng)前時間轉(zhuǎn)換為指定時區(qū)顯示
@Test public void test() throws Exception { Date a=new Date(); SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); sf.setTimeZone(TimeZone.getTimeZone("America/New_York")); //把中國時區(qū)轉(zhuǎn)為了美國紐約時區(qū) System.out.println(sf.format(a)); }
2.指定時間轉(zhuǎn)為指定時區(qū)顯示
真能正確轉(zhuǎn)換嗎?好像有個坑,看了看網(wǎng)上的實現(xiàn)
關(guān)于夏令時,感覺有點問題
//實現(xiàn)方式1 沒有考慮夏令時 @Test public void test2() throws Exception { / Date dateTime=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2016-11-6 14:00:00"); Date dateTime=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2016-10-6 14:00:00"); TimeZone zhong = TimeZone.getTimeZone("GMT+8:00");//中國 TimeZone york = TimeZone.getTimeZone("America/New_York"); //GMT-5 //這里的時區(qū)偏移量是固定的,沒有夏令時,錯 long chineseMills = dateTime.getTime() + york.getRawOffset()-zhong.getRawOffset(); Date date = new Date(chineseMills); System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date)); }
//實現(xiàn)方式2 你可能回想,用Calendar類的Calendar.DST_OFFSET //還是不對Calendar.DST_OFFSET這個是死的 @Test public void test3() throws Exception { // Date time =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2016-11-6 14:00:00"); // Date time =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2016-11-6 1:00:00"); // Date time =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2016-11-6 0:59:00"); // Date time =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2016-11-6 1:59:59"); Date time =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2016-11-6 3:00:00"); // 1、取得本地時間: Calendar cal = Calendar.getInstance(); cal.setTime(time); cal.setTimeZone(TimeZone.getTimeZone("America/New_York")); // 2、取得時間偏移量:這個是固定的 int zoneOffset = cal.get(Calendar.ZONE_OFFSET)/(1000*60*60); // 3、取得夏令時差:這個是固定的,不是根據(jù)時間動態(tài)判斷,只要時區(qū)存在夏令時,就是1 int dstOffset = cal.get(Calendar.DST_OFFSET)/(1000*60*60); System.out.println(zoneOffset); System.out.println(dstOffset); // 4、從本地時間里扣除這些差量,即可以取得UTC時間: // cal.add(Calendar.MILLISECOND, -(zoneOffset + dstOffset)); cal.add(Calendar.HOUR, -(zoneOffset + dstOffset)); Date time2 = cal.getTime(); System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time2)); }
//實現(xiàn)方式3 準(zhǔn)備工作 // 不是說java會自動替我們處理夏令時嗎 //先來個簡單的測試,看夏令時判斷方法是否是正確,就可以推斷,java的自動處理是否正確 //已知2016年:America/New_York的夏令時時間是: 2016-3-13 02:00:00 到 2016-11-06 01:59:59 @Test public void test4() throws Exception { //轉(zhuǎn)換為0時區(qū)時間作為參照點 SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); sf.setTimeZone(TimeZone.getTimeZone("GMT+0")); // Date dateTime=sf.parse("2016-11-6 5:59:59"); Date d1=sf.parse("2016-03-13 6:59:59");//false Date d2=sf.parse("2016-03-13 7:00:00");//true Date d3=sf.parse("2016-11-6 6:59:59");//false Date d4=sf.parse("2016-11-6 7:00:00");//false //現(xiàn)在發(fā)現(xiàn)了,對于夏令時開始的時間判斷確實沒問題,但是對于夏令時的結(jié)束時間判斷錯誤,準(zhǔn)確說,提前了一個小時判斷了 //看下面驗證就知道了,那么為什么提前了一個小時,不知道,怎么解決? 目前想到的只能用java8 d3=sf.parse("2016-11-6 5:59:59");//true d4=sf.parse("2016-11-6 6:00:00");//false TimeZone york = TimeZone.getTimeZone("America/New_York"); //GMT-5 System.out.println("目標(biāo)時區(qū)是否使用了夏令時:"+isDaylight(york, d1)); System.out.println("目標(biāo)時區(qū)是否使用了夏令時:"+isDaylight(york, d2)); System.out.println("目標(biāo)時區(qū)是否使用了夏令時:"+isDaylight(york, d3)); System.out.println("目標(biāo)時區(qū)是否使用了夏令時:"+isDaylight(york, d4)); } //判斷是否在夏令時 private boolean isDaylight(TimeZone zone,Date date) { return zone.useDaylightTime()&&zone.inDaylightTime(date); }
//實現(xiàn)方式3 //通過上面的驗證我們知道了系統(tǒng)的判斷是有問題的,通過設(shè)置時區(qū),程序自動處理夏令時也不是那么正確,起碼我現(xiàn)在無法理解為什么 @Test public void test5() throws Exception { //中間相隔13個小時 中國+8 紐約-5 ChangeZone("2016-3-13 14:59:59", "PRC","America/New_York", "yyyy-MM-dd HH:mm:ss");//2016-03-13 01:59:59 ChangeZone("2016-3-13 15:00:00", "PRC","America/New_York", "yyyy-MM-dd HH:mm:ss");//2016-03-13 03:00:00 ChangeZone("2016-11-6 13:59:59", "PRC","America/New_York", "yyyy-MM-dd HH:mm:ss");//2016-11-06 01:59:59 //這個結(jié)果是不對的,應(yīng)該02:00:00 ChangeZone("2016-11-6 14:00:00", "PRC","America/New_York", "yyyy-MM-dd HH:mm:ss");//2016-11-06 01:00:00 } //具體的實現(xiàn)如下: //思路是沒問題的 public static void ChangeZone(String time, String srcID, String destID, String pattern) throws ParseException { //設(shè)置默認時區(qū) TimeZone zone = TimeZone.getTimeZone(srcID); TimeZone.setDefault(zone); Date date = new SimpleDateFormat(pattern).parse(time); //設(shè)置目標(biāo)時區(qū) TimeZone destzone = TimeZone.getTimeZone(destID); SimpleDateFormat sdf = new SimpleDateFormat(pattern); //設(shè)置要格式化的時區(qū) sdf.setTimeZone(destzone); String changTime = sdf.format(date); // 獲取目標(biāo)時區(qū) System.out.println("修改時區(qū)后" + destzone.getID() + "的時間:" + changTime); }
小結(jié):以上的三種實現(xiàn)方式得到的結(jié)果對夏令時都有點問題
三,java8的實現(xiàn)
1.先看看java8的支持時區(qū)變化
//jdk8的可用時區(qū) @Test public void testName1() throws Exception { //jdk8的所有時區(qū) Set<String> ids = ZoneId.getAvailableZoneIds(); String[] id1 = ids.toArray(new String[ids.size()]); String idss = Arrays.toString(id1).replace("]", ",]"); System.out.println(ids.size());//少了28個 595 //jdk8之前的所有時區(qū) String[] id2 = TimeZone.getAvailableIDs(); System.out.println(id2.length); //623 //找出沒jdk8中沒有的 for (String id : id2) { if (!idss.contains(id+",")) { System.out.print(id+","); } } //結(jié)論:jdk8里面的所有時區(qū),在之前 全部都有 //jdk8刪除的時區(qū)如下: //都是一些容易引起歧義的時區(qū)表示方法 // EST, HST, MST, ACT, AET, AGT, ART, AST, BET, BST, CAT, CNT, CST, CTT, EAT, ECT, IET, IST, JST, MIT, NET, NST, PLT, PNT, PRT, PST, SST, VST, // 但是這些短名稱的其實還是可以使用的,只是支持列表里面沒有了而已 LocalDateTime date = LocalDateTime.ofInstant(Instant.now(), ZoneId.of(ZoneId.SHORT_IDS.get("PST"))); System.out.println("\nDate = " + date); }
2.如何添加時區(qū)信息呢,或者說轉(zhuǎn)換
//LocalDate,LocalDateTime,Instant添加時區(qū)信息 @Test public void testName3() { LocalDate date=LocalDate.now(); //LocalDate添加時區(qū)信息 //方式1 ZonedDateTime zone = date.atStartOfDay(ZoneId.of("GMT+08:00")); System.out.println(zone); zone = date.atStartOfDay(ZoneId.systemDefault()); System.out.println(zone); //方式2 LocalDate date2 = LocalDate.now(ZoneId.of("GMT+0")); System.out.println(date2); System.out.println("------------------------------------"); //LocalDateTime添加時區(qū)信息 LocalDateTime time = LocalDateTime.now(); //方式1 ZonedDateTime zonetime = time.atZone(ZoneId.of("GMT+0")); //方式2 ZonedDateTime zonetime2=ZonedDateTime.now(ZoneId.of("GMT+0")); //方式3 LocalDateTime zonetime3 = LocalDateTime.now(Clock.system(ZoneId.of("GMT+0"))); //方式4 ZonedDateTime zonetime4 = ZonedDateTime.of(time, ZoneId.of("GMT+0")); System.out.println(zonetime); //不變 System.out.println(zonetime2);//變 System.out.println(zonetime3);//變 System.out.println(zonetime4);//不變 System.out.println("------------------------------------"); //Instant時區(qū)信息 ZonedDateTime atZone = Instant.now().atZone(ZoneId.of("GMT+0")); System.out.println(atZone);//變 }
3.如何獲取當(dāng)前時間的指定時間(測試略)
//獲取當(dāng)前時間的指定時區(qū)時間,參照點:0時區(qū) public LocalDateTime getCurrentZoneTime(ZoneId dest) { Objects.requireNonNull(dest); LocalDateTime time2 = LocalDateTime.now(Clock.system(dest)); String zoneDesc = getZoneDesc(TimeZone.getTimeZone(dest)); System.out.println(dest.getId()+"對應(yīng)得標(biāo)準(zhǔn)時區(qū):"+zoneDesc); System.out.println("目標(biāo)時區(qū)"+dest+"的時間"+time2.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); return time2; }
//獲取標(biāo)準(zhǔn)時區(qū),方式1 //在jdk8之前的方法,利用TimeZone private static String getZoneDesc(TimeZone destzone) { Objects.requireNonNull(destzone); int Offset = destzone.getRawOffset() / (1000 * 60 * 60); if (Offset <= 0) { return "GMT"+String.valueOf(Offset); } else { return "GMT+" + String.valueOf(Offset); } }
//java8的方法,方式2,利用ZoneRules //得到時區(qū)的標(biāo)準(zhǔn)偏移量,ZoneRules.getStandardOffset //得到時區(qū)的實際偏移量(得到的偏移量會根據(jù)夏令時改變) // 方式1:ZonedDateTime.getOffset // 方式2:ZoneRules.getOffset private String getZoneDesc2(ZoneId dest) { Objects.requireNonNull(dest); ZoneRules rule=dest.getRules(); //獲取時區(qū)的標(biāo)準(zhǔn)偏移量 String standardOffset = rule.getStandardOffset(ZonedDateTime.now(dest).toInstant()).getId(); String s = standardOffset.split(":")[0]; int Offset = Integer.parseInt(s); //返回方式1:帶小時分鐘 // return "GMT"+standardOffset; //返回方式2:只帶小時數(shù) if (Offset>0) { return "GMT+"+Offset; }else{ return "GMT"+Offset; } }
4.如何獲取指定時區(qū)的指定時間
開始實現(xiàn)上面留下的時區(qū)問題啦
同理先看下使用java8的夏令時判斷方法是否正確
//先手寫個判斷美國的時間是否在夏令時 public boolean isDaylightTime(LocalDateTime a) { Objects.requireNonNull(a); LocalDateTime startDate = a.withMonth(3).toLocalDate().atTime(2, 0); LocalDateTime startlightDay = startDate.with(TemporalAdjusters.dayOfWeekInMonth(2, DayOfWeek.SUNDAY)); //更新為11月 LocalDateTime endDate = a.withMonth(11).toLocalDate().atTime(1, 59,59); LocalDateTime endlightDay = endDate.with(TemporalAdjusters.dayOfWeekInMonth(1, DayOfWeek.SUNDAY)); if (a.isBefore(startlightDay) || a.isAfter(endlightDay)) { System.out.println("不在夏令時"+a); return false; } System.out.println("在夏令時"+a); return true; } //其實java8 已經(jīng)有現(xiàn)成的方法啦,比我的好用 //傳入指定時間和時區(qū) public boolean isDaylightTime(LocalDateTime a,ZoneId dest) { ZonedDateTime z1 = a.atZone(dest); //或者這樣轉(zhuǎn) // ZonedDateTime z2 = ZonedDateTime.of(a, dest); System.out.println(z1.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); ZoneRules rules = dest.getRules(); boolean flag= rules.isDaylightSavings(z1.toInstant()); System.out.println(flag); return flag; }
//測試一下,發(fā)現(xiàn)java8的夏令時方法判斷完全正確噢
//已知2016年:America/New_York的夏令時時間是: 2016-3-13 02:00:00 到 2016-11-06 01:59:59 // (每年3月的第二個星期日,11月的第一個星期日) @Test public void testName() throws Exception { // LocalDateTime a1=LocalDateTime.now(); LocalDateTime a2=LocalDateTime.of(2016, 3, 13, 1, 59,59); LocalDateTime a3=LocalDateTime.of(2016, 3, 13, 2, 00); LocalDateTime a4=LocalDateTime.of(2016, 11, 6, 1, 59,59); LocalDateTime a5=LocalDateTime.of(2016, 11, 6, 2, 0,0); // isDaylightTime(a2); // isDaylightTime(a3); // isDaylightTime(a4); // isDaylightTime(a5); System.out.println("================="); isDaylightTime(a2,ZoneId.of("America/New_York"));//false isDaylightTime(a3,ZoneId.of("America/New_York"));//true isDaylightTime(a4,ZoneId.of("America/New_York"));//true isDaylightTime(a5,ZoneId.of("America/New_York"));//fasle }
開始實現(xiàn):
版本1:
//獲取指定時間的 指定時區(qū)時間 參照點:默認時區(qū) public LocalDateTime getZongTime(LocalDateTime time,ZoneId dest) { Objects.requireNonNull(dest); return getZongTime(time, null, dest); }
//不能用2個時區(qū)的ZonedDateTime相減,因為這里一旦指定時區(qū),那個時間就是這個時區(qū)了 public LocalDateTime getZongTime(LocalDateTime time,ZoneId src,ZoneId dest) { //難點就是如何求偏移量 //這里使用默認時區(qū),在中國的就是中國,在美國的就是美國,這樣估計更合適 Objects.requireNonNull(dest); ZonedDateTime z1=null; if (src==null) { z1 = time.atZone(ZoneId.systemDefault()); }else{ z1 = time.atZone(src); } // 時區(qū)及時響應(yīng)變化 ZonedDateTime z2 = z1.withZoneSameInstant(dest); System.out.println(dest.getId()+"對應(yīng)得標(biāo)準(zhǔn)時區(qū):"+getZoneDesc( TimeZone.getTimeZone(dest))); System.out.println("目標(biāo)時區(qū)"+dest+"的時間"+z2.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); System.out.println("-------------"); return time; }
測試如下:
@Test public void test6() throws Exception { //預(yù)計不在夏令時 2016-03-13 01:59:59 LocalDateTime time4= LocalDateTime.of(2016, 3, 13, 14, 59, 59); getZongTime(time4,ZoneId.of("America/New_York")); //預(yù)計在夏令時 2016-03-13 03:00:00 LocalDateTime time1= LocalDateTime.of(2016, 3, 13, 15, 00, 00); getZongTime(time1,ZoneId.of("America/New_York")); //預(yù)計在夏令時 結(jié)果呢:2016-11-06 01:59:59 //感覺又失敗了,應(yīng)該是2016-11-06 02:59:59 //也就是說,此時java8對夏令時的結(jié)束處理之前的 方式3 一模一樣,提前了一小時判斷 //即把夏令時結(jié)束時間當(dāng)成了2016-11-6 00:59:59,但是java8的判斷方法是正確的呀,是不是有點奇怪 LocalDateTime time2= LocalDateTime.of(2016, 11, 6, 14, 59, 59); getZongTime(time2,ZoneId.of("America/New_York")); //預(yù)計不在夏令時2016-11-06 02:00:00 LocalDateTime time3= LocalDateTime.of(2016, 11, 6, 15, 00, 00); getZongTime(time3,ZoneId.of("America/New_York")); }
所以我現(xiàn)在懷疑這種結(jié)果到底是不是系統(tǒng)計算問題呢,還是我不了解紐約的習(xí)俗呢?
但是還是可以得到我想要的結(jié)果的,運用2個方法:
withEarlierOffsetAtOverlap(), withLaterOffsetAtOverlap()
版本2:
//獲取指定時間的 指定時區(qū)時間 參照點:默認時區(qū) public LocalDateTime getZongTime2(LocalDateTime time,ZoneId dest) { Objects.requireNonNull(dest); return getZongTime2(time, null, dest); } //版本2 public LocalDateTime getZongTime2(LocalDateTime time,ZoneId src,ZoneId dest) { //難點就是如何求偏移量 //這里使用默認時區(qū),在中國的就是中國,在美國的就是美國,這樣估計更合適 Objects.requireNonNull(dest); ZonedDateTime z1=null; if (src==null) { z1 = time.atZone(ZoneId.systemDefault()); }else{ z1 = time.atZone(src); } // ZonedDateTime z2 = z1.withZoneSameInstant(dest); //處理重疊問題 long hours = Duration.between(z2.withEarlierOffsetAtOverlap(), z2.withLaterOffsetAtOverlap()).toHours(); z2= z2.plusHours(hours); System.out.println(dest.getId()+"對應(yīng)得標(biāo)準(zhǔn)時區(qū):"+getZoneDesc( TimeZone.getTimeZone(dest))); System.out.println("目標(biāo)時區(qū)"+dest+"的時間"+z2.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); System.out.println("-------------"); return time; }
測試:OK了
@Test public void test4() throws Exception { //預(yù)計不在夏令時 2016-03-13 01:59:59 LocalDateTime time4= LocalDateTime.of(2016, 3, 13, 14, 59, 59); getZongTime2(time4,ZoneId.of("America/New_York")); //預(yù)計在夏令時 2016-03-13 03:00:00 LocalDateTime time1= LocalDateTime.of(2016, 3, 13, 15, 00, 00); getZongTime2(time1,ZoneId.of("America/New_York")); //預(yù)計在夏令時 2016-11-06 02:59:59 LocalDateTime time2= LocalDateTime.of(2016, 11, 6, 14, 59, 59); getZongTime2(time2,ZoneId.of("America/New_York")); //預(yù)計不在夏令時2016-11-06 02:00:00 LocalDateTime time3= LocalDateTime.of(2016, 11, 6, 15, 00, 00); getZongTime2(time3,ZoneId.of("America/New_York")); }
結(jié)果:
America/New_York對應(yīng)得標(biāo)準(zhǔn)時區(qū):GMT-5
目標(biāo)時區(qū)America/New_York的時間2016-03-13 01:59:59
-------------
America/New_York對應(yīng)得標(biāo)準(zhǔn)時區(qū):GMT-5
目標(biāo)時區(qū)America/New_York的時間2016-03-13 03:00:00
-------------
America/New_York對應(yīng)得標(biāo)準(zhǔn)時區(qū):GMT-5
目標(biāo)時區(qū)America/New_York的時間2016-11-06 02:59:59
-------------
America/New_York對應(yīng)得標(biāo)準(zhǔn)時區(qū):GMT-5
目標(biāo)時區(qū)America/New_York的時間2016-11-06 02:00:00
-------------
上述就是小編為大家分享的怎么在java中將時區(qū)轉(zhuǎn)換為夏令時了,如果剛好有類似的疑惑,不妨參照上述分析進行理解。如果想知道更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
分享標(biāo)題:怎么在java中將時區(qū)轉(zhuǎn)換為夏令時-創(chuàng)新互聯(lián)
標(biāo)題來源:http://www.chinadenli.net/article24/djchce.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、網(wǎng)站設(shè)計公司、服務(wù)器托管、定制開發(fā)、App開發(fā)、響應(yīng)式網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容