Back to Devexpress

SchedulerStorageBase.DateTimeSavingMode Property

corelibraries-devexpress-dot-xtrascheduler-dot-schedulerstoragebase-bfa1c53b.md

latest4.0 KB
Original Source

SchedulerStorageBase.DateTimeSavingMode Property

Gets or sets in what time zone to store the appointment dates.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.Desktop.dll

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
[DefaultValue(DateTimeSavingMode.Appointment)]
public virtual DateTimeSavingMode DateTimeSavingMode { get; set; }
vb
<DefaultValue(DateTimeSavingMode.Appointment)>
Public Overridable Property DateTimeSavingMode As DateTimeSavingMode

Property Value

TypeDefaultDescription
DateTimeSavingModeAppointment

A DateTimeSavingMode enumeration member that specifies a conversion required before storing the DateTime value.

|

Available values:

NameDescription
Appointment

Do not convert Start and End appointment values before storing them in the data source.

| | Storage |

Convert Start and End appointment values to the time zone of the SchedulerControl before storing them in the data source.

| | Utc |

Convert Start and End appointment values to UTC before storing them in the data source.

|

Remarks

If for any reason (e.g. to simplify queries for DateTime values stored in the data source) you require that the appointment start and end data belong to the same time zone, set the DateTimeSavingMode to the DateTimeSavingMode.Storage value to store them in the timezone of the storage (specified using the SchedulerStorageBase.TimeZoneId property).

Tip

Use the UTC time zone for the storage and set the DateTimeSavingMode to the DateTimeSavingMode.Storage value in your applications to make the DateTime data consistent throughout different databases used in your applications.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DateTimeSavingMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-scheduler-mapping-converters/CS/SchedulerMappingConverterExample/Form1.cs#L17

csharp
schedulerStorage1.DateTimeSavingMode = DateTimeSavingMode.Utc;
}

winforms-scheduler-mapping-converters/VB/SchedulerMappingConverterExample/Form1.vb#L19

vb
schedulerStorage1.DateTimeSavingMode = DateTimeSavingMode.Utc
End Sub

Implements

DateTimeSavingMode

See Also

SchedulerStorageBase Class

SchedulerStorageBase Members

DevExpress.XtraScheduler Namespace