> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Agents.ITimeZoneAgent

# \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent">\</a> Interface ITimeZoneAgent

Namespace: [SuperOffice.WebApi.Agents](SuperOffice.WebApi.Agents.md)\
Assembly: SuperOffice.WebApi.dll

TimeZone maintenance

```csharp theme={null}
public interface ITimeZoneAgent : IAgentBase, IDisposable
```

#### Implements

[IAgentBase](SuperOffice.WebApi.Agents.IAgentBase.md),
[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_CheckNewTimeZoneDataAvailableAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CheckNewTimeZoneDataAvailableAsync(RequestOptions)

Check to see if new timezone data is available

```csharp theme={null}
Task<bool> CheckNewTimeZoneDataAvailableAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Returns true if new timezone info is found available, false otherwise

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_DeleteTimeZonesAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteTimeZonesAsync(RequestOptions)

Deletes all time zone data (locations and rules) from the database

```csharp theme={null}
Task DeleteTimeZonesAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_GetBaseTimeZoneIdAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetBaseTimeZoneIdAsync(RequestOptions)

Get the base timezone id.

```csharp theme={null}
Task<int> GetBaseTimeZoneIdAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\&gt;

Returns the base timezone id. Returns 0 if not set.

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_GetDefaultTimeZoneInformationAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDefaultTimeZoneInformationAsync(RequestOptions)

Get information about the current, preferred timezone for the current user. If no such preference has been set, returns the correct fallback (and UserPreferenceId is 0)

```csharp theme={null}
Task<PreferredTimeZone> GetDefaultTimeZoneInformationAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[PreferredTimeZone](SuperOffice.WebApi.Data.PreferredTimeZone.md)\&gt;

Get information about the current, preferred timezone for the current user.

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_GetDefaultTimeZonePreferenceAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDefaultTimeZonePreferenceAsync(RequestOptions)

Returns the id of the default timezone preference with deflevel system wide

```csharp theme={null}
Task<int> GetDefaultTimeZonePreferenceAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\&gt;

The id of the system wide default timezone preference

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_InitializeTimeZoneDataAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> InitializeTimeZoneDataAsync(RequestOptions)

Initalizes the TimeZoneData

```csharp theme={null}
Task<TimeZoneData[]> InitializeTimeZoneDataAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TimeZoneData](SuperOffice.WebApi.Data.TimeZoneData.md)\[]\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_SetActiveTimeZoneRowAsync\_System\_Int32\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetActiveTimeZoneRowAsync(int, bool, RequestOptions)

Set active state of singe row in the TZLocation table

```csharp theme={null}
Task SetActiveTimeZoneRowAsync(int id, bool active, RequestOptions requestOptions = null)
```

#### Parameters

`id` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of row to set active state on

`active` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Set active to true or false

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_SetActiveTimeZonesByFilterAsync\_System\_String\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetActiveTimeZonesByFilterAsync(string, bool, RequestOptions)

Toggles active state of a single row in the TZLocation table

```csharp theme={null}
Task SetActiveTimeZonesByFilterAsync(string filter, bool active, RequestOptions requestOptions = null)
```

#### Parameters

`filter` [string](https://learn.microsoft.com/dotnet/api/system.string)

Filter timezones

`active` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Set active to true or false

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_SetBaseTimeZoneIdAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetBaseTimeZoneIdAsync(int, RequestOptions)

Set the base timezone id.

```csharp theme={null}
Task<bool> SetBaseTimeZoneIdAsync(int timezoneId, RequestOptions requestOptions = null)
```

#### Parameters

`timezoneId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The timezone id to save

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Returns true if setting of base timezone was done

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_TimeOfLastTimeZoneUpdateAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> TimeOfLastTimeZoneUpdateAsync(RequestOptions)

Get the time time zone data was last updated

```csharp theme={null}
Task<DateTime> TimeOfLastTimeZoneUpdateAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)\&gt;

Time of last update

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_ToggleActiveTimeZoneRowAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ToggleActiveTimeZoneRowAsync(int, RequestOptions)

Toggles active state of a single row in the TZLocation table

```csharp theme={null}
Task ToggleActiveTimeZoneRowAsync(int id, RequestOptions requestOptions = null)
```

#### Parameters

`id` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of row to toggle active state on

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ITimeZoneAgent\_UpdateTimeZoneDataAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> UpdateTimeZoneDataAsync(RequestOptions)

Retrieve time zone data from the SuperOffice server and update TimeZone data in the database

```csharp theme={null}
Task<bool> UpdateTimeZoneDataAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Returns true if the operation succeeded


## Related topics

- [SuperOffice.WebApi.Agents.TimeZoneAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.TimeZoneAgent.md)
- [SuperOffice.WebApi.Data.TimeZoneData](/en/api/reference/webapi/SuperOffice.WebApi.Data.TimeZoneData.md)
- [SuperOffice.WebApi.Data.TimeZoneRule](/en/api/reference/webapi/SuperOffice.WebApi.Data.TimeZoneRule.md)
- [SuperOffice.WebApi.Data.PreferredTimeZone](/en/api/reference/webapi/SuperOffice.WebApi.Data.PreferredTimeZone.md)
- [SuperOffice.WebApi.Data.RemoteTimeZoneMethods](/en/api/reference/webapi/SuperOffice.WebApi.Data.RemoteTimeZoneMethods.md)
- [SuperOffice.WebApi.Agents](/en/api/reference/webapi/SuperOffice.WebApi.Agents.md)
