Skip to main content

<a id=“SuperOffice_WebApi_Agents_ITimeZoneAgent”></a> Interface ITimeZoneAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
TimeZone maintenance

Implements

IAgentBase, IDisposable

Methods

<a id=“SuperOffice_WebApi_Agents_ITimeZoneAgent_CheckNewTimeZoneDataAvailableAsync_SuperOffice_WebApi_RequestOptions_”></a> CheckNewTimeZoneDataAvailableAsync(RequestOptions)

Check to see if new timezone data is available

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_ITimeZoneAgent_GetBaseTimeZoneIdAsync_SuperOffice_WebApi_RequestOptions_”></a> GetBaseTimeZoneIdAsync(RequestOptions)

Get the base timezone id.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&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)

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PreferredTimeZone&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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<TimeZoneData[]&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

Parameters

id int Id of row to set active state on active bool Set active to true or false requestOptions RequestOptions Override language/culture codes on this request.

Returns

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

Parameters

filter string Filter timezones active bool Set active to true or false requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_ITimeZoneAgent_SetBaseTimeZoneIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> SetBaseTimeZoneIdAsync(int, RequestOptions)

Set the base timezone id.

Parameters

timezoneId int The timezone id to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<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

Parameters

id int Id of row to toggle active state on requestOptions RequestOptions Override language/culture codes on this request.

Returns

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; Returns true if the operation succeeded