Areas (Forge)

Areas (Forge)

890k Downloads

GUI Clock doesn't show correct real-world time

pdx-red opened this issue ยท 5 comments

commented

Information

Minecraft version: 1.18.1
Modloader: ForgeOR Fabric loader version: x.xx.x
Environment: Singleplayer
Mod name: GUI Clock Forge
Mod version: 3.0

Description

GUI clock is 8 hours off when showing real-world time. if it's 2pm irl, gui clock shows 10pm

Crash report

If available.

commented
  1. What time zone are you currently using?
  2. If you change your time zone, do you observe the GUI clock changing? If not, the GUI clock may be using a fixed time zone such as UTC.
commented
  1. pacific standard time
  2. time did not change when changing time zones
commented

That probably confirms that the GUI clock is using UTC instead of local time.
Pacific Standard Time is UTC-8, and 2 pm UTC-8 = 10 pm UTC.

commented

I've confirmed and the mod uses the PC's local time in the PC's local timezone. If that's incorrect, there is something wrong with the system's settings. Not something I can fix unfortunately. Thanks for giving the mod a try!

commented

This issue has been closed for quite some time, I apologize for bringing it up again as I was also seeking this answer. I just consulted ChatGPT, which provided a useful solution: by adding the JVM parameter -Duser.timezone, such as in the command java -Duser.timezone=Asia/Shanghai -jar yourprogram.jar, the timezone will be set to "Asia/Shanghai". In this case, the time displayed in the chat would be 8 hours ahead of UTC, which is the correct time for me. I hope this could be of help to some people.