Operations with Inforbase in Different Time Zones

Time zone identifier format
Infobase time zone
Session time zone
Current session date
Current timestamp

When a distributed infobase is used with its nodes located in different time zones, it is required to ensure that received data are adequate when standard periods, standard beginning date and other time-related indexes are used.

1C:Enterprise allows to synchronize zonal time or scheduled time. To make this possible, in every node of the distributed infobase data are bound to the current date of the session while the node itself is described by the value of the session time zone. Using the 1C:Enterprise script the configuration mechanisms can calculate time in relation to the central or any other node of the infobase and can also take summer time into account.

The infobase time zone, session time zone, and session time notions have been introduced.

The time zones are defined and identified in compliance with the time zones list (zoneinfo database) usually referred to as Olson database. The majority of time zone identifiers are formatted as <region>/<city>, e.g., Europe/Moscow. For details, visit http://www.twinsun.com/tz/tz-link.htm.

GMT time zone identifiers can be formatted as follows:

GMT{+/-}h[h][:mm]
where hh=0:23, mm=0:59.

Infobase time zone:

  • it is not defined after an infobase is created;
  • it can be defined from 1C:Enterprise script;
  • it is stored in the database and upon infobase dumping;
  • it is available from the 1C:Enterprise script on the server, in the thick client, in the external connection;
  • it is used upon session start to determine the session time zone;
  • it is transferred to a new infobase when an initial image of a distributed infobase is created.


Session time zone:

  • upon session start it is equal to the infobase time zone if the infobase time zone is defined or equal to the server time zone if infobase time zone is not defined;
  • it can be defined from 1C:Enterprise script;
  • it is preserved until the end of the session;
  • it is available from the 1C:Enterprise script on the server, in the thick client, in the external connection;
  • it is used to determine the current session date and the current timestamp.


Current session date:

  • it is equal to the computer date modified to comply with the session time zone;
  • it is available from the 1C:Enterprise script on the server, in the thick client, in the external connection;
  • it is used for operations with documents, business processes, tasks, periodic information registers in order to define default date and check the current date.


Current timestamp:

  • it is generated based on the current session date;
  • a separate ascending sequence of dates for every session time zone of this infobase.

 

Some algorithms used for operations over time zones are built into the system mechanisms at the platform level. Since when a report is executed or a dynamic list is operated, standard periods and standard beginning dates are calculated against the current session date, when current dates are received for the standard period and standard beginning date at the thick client, server, and external connection, the resulting dates will be related to the current session date.

When conditional formatting is processed for a managed form, the client uses the date received from the current client date and adjusted to take server time zone into account.

The server time zone is sent to the client side of the managed form when the form is created, provided that conditional formatting is selected for this form, or after the form is called in context (if conditional formatting of the form has been changed in the process of calling).

1C:Enterprise Developer's Community