Im working in ASP.NET MVC web project where admin can setup date time (Start Datetime/End Datetime) and timezone to display certain messages. There are other users who can either be in same timezone (as message setup) or could be in different timezone. Now the task is to display admin setup messages when the users date time matches with the one setup by admin.
What i haven't been able to figure out is what is the proper way of doing the compare with date time with different timezone including the day time saving ? Any help will be appreciated.
Update:
//to display date time picker
@(Html.Kendo().DateTimePicker()
.Name("datetimepicker")
.HtmlAttributes(new { style = "width:100%;" })
)
//to display timezone on admin page
var allTimeZones = TimeZoneInfo.GetSystemTimeZones();
List<SelectListItem> timeZoneLists = allTimeZones.Select(timeZone => new SelectListItem {Value = timeZone.Id, Text = timeZone.DisplayName}).ToList();
ViewBag.TimeZoneLists = timeZoneLists;
Thanks.