提交 50e779b2 编写于 作者: G geffzhang

Update AccountController.cs

TimeZoneInfo 替代过时的 TimeZone
上级 b3ca5f28
......@@ -118,10 +118,8 @@ namespace IoTSharp.Controllers
signingCredentials: signinCredentials);
var t = (DateTime.Now.AddDays(1).Ticks - TimeZone.CurrentTimeZone
.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0)).Ticks) / 10000;
var t = (DateTime.Now.AddDays(1).Ticks - TimeZoneInfo.ConvertTime(new DateTime(1970, 1, 1, 0, 0, 0, 0), TimeZoneInfo.Local).Ticks) / 10000;
var token = new TokenEntity
{
access_token = new JwtSecurityTokenHandler().WriteToken(tokeOptions),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册