> If `SupportsMultipleTimezone` is `false` or `dateTime.Kind` is not `Utc` or no timezone is set, it will return the given `DateTime` or `DateTimeOffset` without any changes.
@ -78,7 +78,7 @@ If the user's timezone is `Europe/Istanbul`
// 2025-03-01T05:30:00Z
var utcTime = new DateTime(2025, 3, 1, 5, 30, 0, DateTimeKind.Utc);
var userTime = Clock.ConvertTo(utcTime);
var userTime = Clock.ConvertToUserTime(utcTime);
// Europe/Istanbul has 3 hours difference with UTC. So, the result will be 3 hours later.
@ -441,7 +441,7 @@ In short, we use the `abp.clock.normalizeToLocaleString` method to display time,
### Handling Timezone in Blazor
We cannot automatically complete some work in `Blazor UI`, we need to inject `IClock` and use the `ConvertTo` and `ConvertFrom` methods to display and create/update entities.
We cannot automatically complete some work in `Blazor UI`, we need to inject `IClock` and use the `ConvertToUserTime` and `ConvertToUtc` methods to display and create/update entities.
Below is a complete `Meeting` page, please refer to the usage of `Clock` in it.
@ -501,35 +501,35 @@ Below is a complete `Meeting` page, please refer to the usage of `Clock` in it.
@ -93,7 +93,7 @@ var normalizedDateTime = Clock.Normalize(dateTime)
#### Convert given UTC to user's time zone.
`DateTime ConvertTo(DateTime dateTime)` and `DateTimeOffset ConvertTo(DateTimeOffset dateTimeOffset)` methods convert given UTC `DateTime` or `DateTimeOffset` to the user's time zone.
`DateTime ConvertToUserTime(DateTime utcDateTime)` and `DateTimeOffset ConvertToUserTime(DateTimeOffset dateTimeOffset)` methods convert given UTC `DateTime` or `DateTimeOffset` to the user's time zone.
> If `SupportsMultipleTimezone` is `false` or `dateTime.Kind` is not `Utc` or these is no timezone setting, it returns the given `DateTime` or `DateTimeOffset` without any changes.
@ -105,7 +105,7 @@ If user's `TimeZone Setting` is `Europe/Istanbul`
// 2025-03-01T05:30:00Z
var utcTime = new DateTime(2025, 3, 1, 5, 30, 0, DateTimeKind.Utc);
var userTime = Clock.ConvertTo(utcTime);
var userTime = Clock.ConvertToUserTime(utcTime);
// Europe/Istanbul has 3 hours difference with UTC. So, the result will be 3 hours later.
`DateTime ConvertFrom(DateTime dateTime)` method convert given user's `DateTime` to UTC.
`DateTime ConvertToUtc(DateTime dateTime)` method convert given user's `DateTime` to UTC.
> If `SupportsMultipleTimezone` is `false` or `dateTime.Kind` is `Utc` or these is no timezone setting, it returns the given `DateTime` without any changes.
@ -137,7 +137,7 @@ If user's `TimeZone Setting` is `Europe/Istanbul`
// 2025-03-01T05:30:00
var userTime = new DateTime(2025, 3, 1, 5, 30, 0, DateTimeKind.Unspecified); //Same as Local
var utcTime = Clock.ConvertFrom(userTime);
var utcTime = Clock.ConvertToUtc(userTime);
// Europe/Istanbul has 3 hours difference with UTC. So, the result will be 3 hours earlier.