Computer systems

Computer systems
Most modern computer operating systems include information about time zones, including the capability to automatically change the local time when daylight savings starts and finishes (see the article on Daylight saving time for more details on this aspect).

[edit]
Microsoft Windows
Windows based computer systems normally keep system time as local time in a particular time zone. A system database of timezone information includes the offset from UTC and rules that indicate the start and end dates for daylight savings in each zone. Application software is able to calculate the time in various zones, but there is no standard way for users from multiple zones to use a single server and have their own local time presented to them.

[edit]
Unix
Most Unix based systems, including Linux and Mac OS X, keep system time as UTC (Coordinated Universal Time). Rather than having a single timezone set for the whole computer, timezone offsets can vary for different processes. Standard library routines are used to calculate the local time based on the current timezone, normally supplied to processes through the TZ environment variable. This allows users in multiple timezones to use the same computer, with their respective local times displayed correctly to each user. Timezone information is most commonly stored in a timezone database known as zoneinfo (or sometimes tz or Olson format). In fact, many systems, including anything using the GNU C Library, can make use of this database.

[edit]
Java
While most application software will use the underlying operating system for timezone information, Java, from version 1.3.1, has maintained its own timezone database. This database (as well as the operating system database) will need to be updated whenever timezone rules change.[citation needed]

[edit]
Python
The standard module datetime stores and operates on the timezone information class tzinfo.

[edit]
Databases
Some databases allow storage of a datetime type having time zone information.

[edit]
Oracle
Oracle Database is configured with a database time zone, and connecting clients are configured with session time zones. Oracle Database uses two data types to store time zone information:

TIMESTAMP WITH time zone
Stores date and time information with the offset from UTC
TIMESTAMP WITH LOCAL time zone
Stores date and time information with the offset from UTC, automatically adjusting the date and time from the stored time zone to the client's session time zone
[edit]
PostgreSQL
PostgreSQL uses the timestamptz datatype. It stores as UTC time, but operats on the current timezone, which could be different with every connection. Addition of the time interval includes daylight saving time.