Migration from local server to Azure: TIMEZONE UTC. How to solve?

前端 未结 3 1928
臣服心动
臣服心动 2021-01-02 19:19

I designed my application considering the fact that, according to the specifications, should run on a server located in Italy and clients will be italian people only.

<
3条回答
  •  星月不相逢
    2021-01-02 20:13

    I have asked to MS support.

    This is the response:

    Changing the server time on the Azure Virtual Machines using a startup task is not recommended, you should rather use methods like TimeZoneInfo.ConvertTimeFromUTCTime in your code.

    So I will not change the server timezone. Waiting for a response from the support I discover that SqlServer 2008 have a DateTimeOffset data type that is perfect!

    http://blogs.msdn.com/b/davidrickard/archive/2012/04/07/system-datetime-good-practices-and-common-pitfalls.aspx

提交回复
热议问题