# Tenant Time Zone for Cron Scheduler

> Add option to support the scheduling of cron pattern scheduler with tenant time zone instead of server time zone.

**Goal:** Functional

**Developer:** Hengsin ([talk](https://wiki.idempiere.org/en/User_talk:Hengsin))

**Feature Ticket:** [IDEMPIERE-5093](https://idempiere.atlassian.net/browse/IDEMPIERE-5093)

**Description:**

**Changes:**

- *Added **Timestamp With Time Zone** data type reference.*
![5093 TimestampWithTimeZoneReference](pathname:///img/new-features/v10/5093_TimestampWithTimeZoneReference.png)

_Timestamp With Time Zone_

- *Added example usage at Test window. The field uses tenant time zone if set, otherwise it falls back to the detected browser time zone. There's suggestion to add user level time zone preference but that's not implemented in this ticket.*
![5093 TimestampWithTimeZoneField](pathname:///img/new-features/v10/5093_TimestampWithTimeZoneField.png)

_Timestamp With Time Zone Field_

- *Added **Time Zone** data type reference. It is a text data type to store Time Zone id.*
![5093 TimeZoneReference](pathname:///img/new-features/v10/5093_TimeZoneReference.png)

_Time Zone data type reference_

- *Context Menu for **Time Zone** field. The context menu will show the auto detected browser time zone id.*
![5093 TimeZoneFieldContextMenu](pathname:///img/new-features/v10/5093_TimeZoneFieldContextMenu.png)

_Time Zone field context menu_

- *Drop down list for **Time Zone** field show the list of all supported standard Time Zone ids. User can also choose to enter custom Time Zone id in the format of GMT&lt;+/-&gt;&lt;hour offset&gt;:&lt;minute offset&gt; (for e.g GMT+03:00).*
![5093 TimeZoneFieldDropDown](pathname:///img/new-features/v10/5093_TimeZoneFieldDropDown.png)

_Time Zone field Drop Down List_

- *Added time zone field to Tenant Info (AD_ClientInfo.TimeZone). When set, cron scheduler will use this instead of server time zone.*
![5093 TenantTimeZoneField](pathname:///img/new-features/v10/5093_TenantTimeZoneField.png)

_Tenant Info Time Zone field_

- *Change AD_Scheduler.DateLastRun and AD_Scheduler.DateNextRun column to Timestamp With Time Zone type.*
![5093 SchedulerDateFields](pathname:///img/new-features/v10/5093_SchedulerDateFields.png)

_Scheduler timestamp with time zone fields_

- *Added #clientInfo_timeZone environment context - store the auto detected browser time zone id*

## Change on Schedule behaviour
Before this ticket when you had a schedule configured to run at 9AM, the job was executed at 9AM of the server timezone.

This ticket changed this behavior and now the job is executed at 9AM **of the tenant timezone** where the job is defined.
