0

I'm using window server and want to change the time zone of the server to (UTC +7), I changed the timezone and DateTime to UTC +7 and restarted my server, but it seems to be stable for one day. After that, It went back to GMT. How can I fix it permanently? Thank you so much!

  • It is appreciated if you could provide more details about the porblem. How did you change the timezone from UTC to GMT and where did you see the date time just get back? In your application or in IIS log? – Jokies Ding Jul 30 '20 at 08:53
  • I clicked the time on the right bottom corner and went there for changing the timezone after that went to "change date and time" to make sure the time is the same as my local. it worked well, since I came back the next morning the time of the server (right bottom corner) go back to GMT ( I check the time on the internet and it's the same with GMT =)) – Nguyễn Minh Chí Jul 30 '20 at 09:12
  • Have you tried to output group policy and check which one would probably cause this issue? – Jokies Ding Jul 31 '20 at 08:23

1 Answers1

0

A few things:

  • It sounds like you changed your clock rather than changing your time zone. You shouldn't do that. Always set the server time automatically and keep your clock synchronized. You can change the time zone if you like, but never set the date and time manually.

  • You probably shouldn't need to make such a change to your server's time zone setting at all. Instead, your code should be written to not rely upon the server's time zone setting. If you need the local time in a specific time zone, write code that does that. In other words, get the UTC time and convert it to a specific time zone. There are lots of examples of this in many programming languages.

  • Your question lacks any detail about the program you are running on this server and the code, language, or framework you are using. Thus in general, it is not on-topic for StackOverflow. In the future, if you have general computing questions, ask on SuperUser. If you have questions specifically about server administration, ask on ServerFault.

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575