I am receiving JSON object containing a time in following format.
...
"start_time": "2020-12-30T17:30:00Z",
...
I've parsed it and assigned to ZonedDateTime
ZonedDateTime start_time = ZonedDateTime.parse(jsonObject.getString("start_time"));
Now I'd like to show it in String
with users' device's local time zone.
I believe json time is in UTC zone. So users in Hongkong would see +8 offset, while users in Los Angeles would see -8 offset. So they would see as follows.
Users in HK: 2020-12-31 01:30
Users in LA: 2020-12-30 09:30
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…