如何更改Azure虚拟机中的时区? [英] How to change time zone in Azure Virtual Machine?

查看:270
本文介绍了如何更改Azure虚拟机中的时区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在运行Windows服务器的Azure虚拟机中将时区从UTC更改为阿拉伯标准时间?

How to change the time zone from UTC to Arabian Standard Time in Azure virtual machine running the windows server?

推荐答案

恐怕您实际上无法更改时区.即使您更改了一次,重新启动后时区也将恢复为UTC.

I'm afraid that you would not be able to change the time Zone actually. Even if you changed it onece, the time zone would revert to UTC after restarting.

此外,也不建议更改Azure IaaS VM的时区.

Also, changing the time zone for Azure IaaS VM is not recommended.

在Azure上更改服务器时间可能很诱人 虚拟机使用启动任务,不建议您使用 而是应该使用 TimeZoneInfo.ConvertTimeFromUTCTime 之类的方法 您的代码.

While it may be very tempting to change the server time on the Azure Virtual Machines using a startup task, it is not recommended, you should rather use methods like TimeZoneInfo.ConvertTimeFromUTCTime in your code.

您还可以检查

You can also check this blog for more details about the TimeZone on Azure.

希望这会有所帮助!

这篇关于如何更改Azure虚拟机中的时区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆