【问题标题】:Sitecore user manager showing wrong timestampSitecore 用户管理器显示错误的时间戳
【发布时间】:2016-01-01 15:38:53
【问题描述】:

我在使用 Sitecore.NET 6.6.0(修订版 140410)的 Sitecore 站点上遇到了一个奇怪的问题,而且它只发生在生产服务器上!

当你打开安全 -> 用户管理器,选择一个用户然后点击编辑,信息标签会显示所有的时间戳(除了创建)作为当前日期时间!请看下面的截图:

这在我们使用相同 Sitecore 版本的开发服务器上运行良好。我必须添加这是针对 Intranet 站点的,因此对生产确实有访问限制。

有什么想法可能会出错吗?

谢谢!

【问题讨论】:

    标签: timestamp sitecore sitecore6 usermanager


    【解决方案1】:

    如果你正在检查这个类 Sitecore.Shell.Applications.Security.EditUser.EditUserPage你会找到与lastLogindatecreatiodate等相关的代码:

     MembershipUser user2 = Membership.GetUser(user.Name);
     if (user2 != null)
     {
        CultureInfo culture = User.Current.Profile.Culture;
        this.LastLoginDate.Text = FormatDate(user2.LastLoginDate, culture);
        this.CreationDate.Text = FormatDate(user2.CreationDate, culture);
        this.LastActivityDate.Text = FormatDate(user2.LastActivityDate, culture);
        this.LastPasswordChangedDate.Text = FormatDate(user2.LastPasswordChangedDate, culture);
        this.LastLockoutDate.Text = FormatDate(user2.LastLockoutDate, culture);
     }
    

    看起来会员数据库使用的是 UTC 时间,即您的时间之间的差异。 请检查此article

    【讨论】:

    • 感谢您的回复。但是,显示的时间戳始终只是当前日期时间,而不是不同的日期时间。因此,如果我关闭用户管理器并再次打开,它会再次更新以显示当前日期时间!这是我没有得到的。
    • 你能检查一下是否有人修改了这个文件:\Website\sitecore\shell\Applications\Security\EditUser\EditUser.xaml.xml
    • 非常感谢您的帮助。看起来普通的 Sitecore 用户确实正确显示了时间戳。只有使用域​​控制器的 Sitecore 用户才会遇到此问题。所以这可能是因为它们可能会在后台不断轮询,而 Sitecore 不适合处理这个问题。
    猜你喜欢
    • 2015-06-14
    • 2012-11-20
    • 2014-03-08
    • 1970-01-01
    • 2017-04-21
    • 1970-01-01
    • 2011-12-14
    • 2022-08-19
    • 1970-01-01
    相关资源
    最近更新 更多