TimeZone.getTimeZone(“CST”) returns GMT

前端 未结 6 1032
梦毁少年i
梦毁少年i 2020-12-17 20:25

I\'m converting time from CST to local time but getTimeZone doesn\'t seem to work properly.

    String cstTime = \"2013-06-21 14:00:00\";

    S         


        
6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-17 21:10

    You can use "CST6CDT" Timezone it will automatically provide you the correct time when the Central Daylight Time (CDT) switched back to CST or vice versa.

提交回复
热议问题