Get date in current timezone in java

前端 未结 4 813
遇见更好的自我
遇见更好的自我 2020-12-05 00:03

I have been searching over the net from past few hours to get the datetime in my system timezone.

When I use calendar.getTimezone.getDefaultName it always returns m

4条回答
  •  -上瘾入骨i
    2020-12-05 00:38

    I believe what you're looking for is the Joda library. It has functionality better than the Calendar or Date classes as specified in the answer here.

    This function should be particularly useful.

提交回复
热议问题