Time Zone in WinUI Scheduler (SfScheduler)

12 Apr 20227 minutes to read

The Scheduler allows to create appointments in various time zones and display them in your time zone or any other time zone. Use the time zone in the following four different ways:

  • Create appointments in the different time zones.
  • Display appointments based on the client’s time zone.
  • Display appointments based on the scheduler’s time zone.
  • Display appointments at the same time everywhere regardless of the client’s time zone.

We have added the following Time Zone’s for the respective countries to cover all the time zone regions, use any of the time zones from the following list for scheduler time zone.

Time Zone Region UTC Offset
Samoa Standard Time Pacific/Apia UTC - 13:00
Dateline Standard Time Etc/GMT+12 UTC - 12:00
UTC-11 Pacific/Midway UTC - 11:00
Hawaiian Standard Time Pacific/Honolulu UTC - 10:00
Alaskan Standard Time America/Anchorage UTC - 09:00
Pacific Standard Time America/Los_Angeles UTC - 08:00
Pacific Standard Time (Mexico) America/Santa_Isabel UTC - 08:00
Mountain Standard Time America/Denver UTC - 07:00
Mountain Standard Time (Mexico) America/Chihuahua UTC - 07:00
US Mountain Standard Time America/Phoenix UTC - 07:00
Canada Central Standard Time America/Regina UTC - 06:00
Central America Standard Time America/Guatemala UTC - 06:00
Central Standard Time America/Chicago UTC - 06:00
Eastern Standard Time America/New_York UTC - 05:00
SA Pacific Standard Time America/Bogota UTC - 05:00
US Eastern Standard Time America/Indianapolis UTC - 05:00
Venezuela Standard Time America/Caracas UTC - 04:30
Atlantic Standard Time America/Halifax UTC - 04:00
Central Brazilian Standard Time America/Cuiaba UTC - 04:00
Pacific SA Standard Time America/Santiago UTC - 04:00
Paraguay Standard Time America/Asuncion UTC - 04:00
SA Western Standard Time America/La_Paz UTC - 04:00
Newfoundland Standard Time America/St_Johns UTC - 03:30
Bahia Standard Time America/Bahia UTC - 03:00
Argentina Standard Time America/Buenos_Aires UTC - 03:00
E. South America Standard Time America/Sao_Paulo UTC - 03:00
Greenland Standard Time America/Godthab UTC - 03:00
Montevideo Standard Time America/Montevideo UTC - 03:00
SA Eastern Standard Time America/Cayenne UTC - 03:00
UTC-02 America/Noronha UTC - 02:00
Azores Standard Time Atlantic/Azores UTC - 01:00
Cape Verde Standard Time Atlantic/Cape_Verde UTC - 01:00
GMT Standard Time Europe/London UTC
Greenwich Standard Time Atlantic/Reykjavik UTC
Morocco Standard Time Africa/Casablanca UTC
UTC America/Danmarkshavn UTC
Central Europe Standard Time Europe/Budapest UTC + 01:00
Central European Standard Time Europe/Warsaw UTC + 01:00
Namibia Standard Time Africa/Windhoek UTC + 01:00
Romance Standard Time Europe/Paris UTC + 01:00
W. Central Africa Standard Time Africa/Lagos UTC + 01:00
W. Europe Standard Time Europe/Berlin UTC + 01:00
Egypt Standard Time Africa/Cairo UTC + 02:00
FLE Standard Time Europe/Kiev UTC + 02:00
GTB Standard Time Europe/Bucharest UTC + 02:00
Israel Standard Time Asia/Jerusalem UTC + 02:00
Libya Standard Time Africa/Tripoli UTC + 02:00
Middle East Standard Time Asia/Beirut UTC + 02:00
South Africa Standard Time Africa/Johannesburg UTC + 02:00
Syria Standard Time Asia/Damascus UTC + 02:00
Turkey Standard Time Europe/Istanbul UTC + 02:00
Arab Standard Time Asia/Riyadh UTC + 03:00
Arabic Standard Time Asia/Baghdad UTC + 03:00
Belarus Standard Time Europe/Minsk UTC + 03:00
E. Africa Standard Time Africa/Nairobi UTC + 03:00
Jordan Standard Time Asia/Amman UTC + 03:00
Kaliningrad Standard Time Europe/Kaliningrad UTC + 03:00
Iran Standard Time Asia/Tehran UTC + 03:30
Arabian Standard Time Etc/GMT-4 UTC + 04:00
Azerbaijan Standard Time Asia/Baku UTC + 04:00
Caucasus Standard Time Asia/Yerevan UTC + 04:00
Georgian Standard Time Asia/Tbilisi UTC + 04:00
Mauritius Standard Time Indian/Mauritius UTC + 04:00
Russia Time Zone 3 Europe/Samara UTC + 04:00
Russian Standard Time Europe/Moscow UTC + 04:00
Afghanistan Standard Time Asia/Kabul UTC + 04:30
Pakistan Standard Time Asia/Karachi UTC + 05:00
West Asia Standard Time Asia/Tashkent UTC + 05:00
India Standard Time Asia/Calcutta UTC + 05:30
Sri Lanka Standard Time Asia/Colombo UTC + 05:30
Nepal Standard Time Asia/Kathmandu UTC + 05:45
Bangladesh Standard Time Asia/Dhaka UTC + 06:00
Central Asia Standard Time Asia/Almaty UTC + 06:00
Ekaterinburg Standard Time Asia/Yekaterinburg UTC + 06:00
Myanmar Standard Time Asia/Rangoon UTC + 06:30
SE Asia Standard Time Asia/Bangkok UTC + 07:00
N. Central Asia Standard Time Asia/Novosibirsk UTC + 07:00
China Standard Time Asia/Shanghai UTC + 08:00
North Asia Standard Time Asia/Krasnoyarsk UTC + 08:00
Singapore Standard Time Asia/Singapore UTC + 08:00
Taipei Standard Time Asia/Taipei UTC + 08:00
Ulaanbaatar Standard Time Asia/Ulaanbaatar UTC + 08:00
W. Australia Standard Time Australia/Perth UTC + 08:00
Korea Standard Time Asia/Seoul UTC + 09:00
North Asia East Standard Time Asia/Irkutsk UTC + 09:00
Tokyo Standard Time Asia/Tokyo UTC + 09:00
AUS Central Standard Time Australia/Darwin UTC + 09:30
Cen. Australia Standard Time Australia/Adelaide UTC + 09:30
AUS Eastern Standard Time Australia/Sydney UTC + 10:00
E. Australia Standard Time Australia/Brisbane UTC + 10:00
Tasmania Standard Time Australia/Hobart UTC + 10:00
West Pacific Standard Time Pacific/Port Moresby UTC + 10:00
Yakutsk Standard Time Asia/Yakutsk UTC + 10:00
Central Pacific Standard Time Pacific/Guadalcanal UTC + 11:00
Russia Time Zone 10 Asia/Srednekolymsk UTC + 11:00
Vladivostok Standard Time Asia/Vladivostok UTC + 11:00
Fiji Standard Time Pacific/Fiji UTC + 12:00
Magadan Standard Time Asia/Magadan UTC + 12:00
New Zealand Standard Time Pacific/Auckland UTC + 12:00
Russia Time Zone 11 Asia/Kamchatka UTC + 12:00
UTC+12 Pacific/Tarawa UTC + 12:00
Tonga Standard Time Pacific/Tongatapu UTC + 13:00
Line Islands Standard Time Pacific/Kiritimati UTC + 14:00

Create appointments in different time zones

Create appointments at different time zones using the StartTimeZone and EndTimeZone properties of ScheduleAppointment. An appointment’s start time and end time are calculated based on the given time zone information for the start time and end time. Set different time zones to the StartTimeZone and EndTimeZone properties.

Use the StartTime and EndTime properties of ScheduleAppointment to get the exact start time and end time of an appointment. By using the ActualStartTime and ActualEndTime properties, get the exact appointment rendering time.

// Creating an instance for schedule appointment collection.
var appointment = new ScheduleAppointmentCollection();
//Adding the schedule appointment in the schedule appointment collection. 
appointment.Add(new ScheduleAppointment()
{
    // Setting the subject for an event.
    Subject = "Meeting",
    // Setting the start time of an event.
    StartTime = DateTime.Now,
    // Setting the end time of an event.
    EndTime = DateTime.Now.AddHours(1),
    // Setting the StartTimeZone for an event.
    StartTimeZone = "India Standard Time",
    // Setting the EndTimeZone for an event.
    EndTimeZone = "India Standard Time"
});
//Adding the schedule appointment collection to the ItemsSource of SfSchedule.
this.Schedule.ItemsSource = appointment;

NOTE

  • If the recurring appointment is converted to another time zone, then the whole sequence will be recalculated according to the new time zone information.
  • If an all-day appointment is created, its start time and end time will be set to 12 A.M. and 12 A.M. by default. So, the time zone is not applicable for all-day appointments.
  • The Scheduler supports daylight saving time.
  • The time zone support is applicable for the custom appointments too. So, map the corresponding property.
  • Use the TimeZone for custom appointments by mapping the StartTimeZone and EndTimeZone custom properties of AppointmentMapping.

Display appointments based on client’s time zone

Display the appointments based on the client’s local time zone in the scheduler. For example, consider a scenario that you are in North Carolina and you want to set up a meeting at 10 A.M. on North Carolina time. You have colleagues in London and Chennai, and they also need to participate. The time for this meeting will be 3 P.M. (15:00) in London and 5.30 A.M. in Chennai. When each of you view your Scheduler, you need to see the appointment displayed relative to your local time zones 5.30 A.M., 10 A.M., and 3 P.M., respectively. It can be achieved by setting schedule time zone to default (it will consider your device’s local time zone as schedule time zone) and appointment’s time zone to Eastern Standard Time (North Carolina) [as you are in North Carolina and its time zone is Eastern Standard Time].

Display appointments based on Scheduler time zone

Set the specific time zone to schedule using the TimeZone property of scheduler. In this scenario, the appointments will be displayed in UTC time when the StartTimeZone and EndTimeZone properties of ScheduleAppointment are set to null. The appointments will be displayed in UTC time based on the given scheduler time zone.

<scheduler:SfScheduler x:Name="Schedule"  
                       ViewType="Week"
                       TimeZone="Central America Standard Time">
</scheduler:SfScheduler>
this.Schedule.TimeZone = "Central America Standard Time";

Display appointments at same time everywhere regardless of client’s time zone

Display appointments at the same time everywhere without considering the time zone while setting the TimeZone property of scheduler, the StartTimeZone, and EndTimeZone properties of ScheduleAppointment to null. The appointments will be displayed based on the given StartTime and EndTime of appointments everywhere without considering the time zone.

Updating start and end time after drag and drop appointment based on time zone.

After rescheduling an appointment using the drag and drop, the appointment’s start and end time value will be updated based on scheduler time zone and appointment’s time zone.

For an example, consider the local time zone is India Standard Time, if an appointment is dragged from 9 AM and dropped on 1 PM and the scheduler’s TimeZone is not set and the appointment’s StartTimeZone and EndTimeZone has been set as AUS Central Standard Time (Darwin), then the appointment’s start time and end time value will be converted from Local time zone to appointment time zone and the appointment’s start time will be saved at 9 AM.

If the scheduler’s TimeZone is set as AUS Central Standard Time (Darwin) and the appointment’s StartTimeZone and EndTimeZone as Central Standard Time (Mexico) then the appointment’s start time and end time value has been converted from scheduler’s time zone to appointment time zone and the appointment’s start time will be saved at 3.30 AM of next day.
If the scheduler’s TimeZone is set as AUS Central Standard Time (Darwin) and appointment’s time zone was not set then the appointment’s start time and end time value is converted from the scheduler time zone to UTC time zone and the appointment’s start time will be saved at 10.30 PM.