The following sample code shows how to get the current time according to a user's time zone settings:
[C#]
using CMS.SiteProvider;
...
// Get user UserInfo ui = UserInfoProvider.GetFullUserInfo("administrator");
// If user exist if (ui != null) { // Get converted time System.DateTime convertedTime = TimeZoneHelper.ConvertUserDateTime(System.DateTime.Now, ui); } |