Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要显示当前的时区自定义 ID(“GMT+X”格式,X 介于 1 和 23 之间)。我尝试以下说明但没有成功:
TimeZone.getDefault().getID()
TimeZone.getDefault().getDisplayName(true, TimeZone.SHORT)
我该怎么做(例如“GMT+2”)?
提前致谢~Mounir