Skip to content

NovaStar Data / Service Parameter / timezone


Overview

This is new functionality that is being implemented.

The timezone service parameter indicates time zone to use for processing and output. See also the time zone technical note. By default, date/time are returned using the ISO-8601 time format, which uses an offset for time zone:

2020-07-15T01:02:00-06:00

The -06:00 represents the time zone as an offset from UTC at that point in time. For example, 2020-07-15T00:00:00-06:00 corresponds to noon UTC. An array of data records may have several time zones, for example -06:00 and -07:00 if the period crosses a daylight saving change. The time offset implicitly reflects time zone in that local time zone is considered when computing the offset.

Timezone is handled internally as follows:

  1. The NovaStar database stores data in UTC. All data inserts convert local time or other time zone to UTC. All data queries convert UTC to requested time zone, typically local time for the computer. For systems where the NovaStar server is in the same time zone as the user's computer, all defaults work OK.
  2. The NovaStar server typically has local time zone, with daylight saving. In some cases, the server is configured to use a time zone that does not use daylight saving.
  3. The database defaults are typically set to use the database server time zone. Therefore the time zone of the server will be used in output date/time values.
  4. The requesting software on user's machine typically uses local time zone. If not passed to the data web services, the NovaStar server local timezone is used. If the requesting software passes timezone as a service parameter, the requested timezone will be used for output if necessary by some services. In particular, the ts service uses time zone when computing interval data for daily and larger interval.

Service Parameter Editor

The api-ui service can be used to edit a service request.

Service Parameter Syntax

The parameter syntax is as follows:

timezone=America/Denver

timezone Service Parameter Values

Value                                             Description
Use the time zone for the NovaStar server, typically local time but may be set to a standard time zone such as PST, which does not use daylight saving time. Although the returned data use the local time zone of the data server, software that reads the data can convert the ISO-8601 offset time zone notation to the local time zone of the computer.
America/Denver (or similar) Many systems use this form of time zone, which indicates a time zone offset and adjustment for daylight saving if necessary. The benefits of requesting the output time zone are:
  • the response has numerical date/time values consistent with the local time (facilitates use)
  • ensures that interval data are computed for the desired local time zone, for example in a system that includes data for stations that are physically located in time zone other than the data server
.
StationTimeZone Being evaluated as NovaStar default. Returns the data formatted for the local time of the station, for example America/Denver for stations in Mountain Time Zone area.

Examples

Need to show output from service call that illustrates how time zone is being recognized.

Troubleshooting

See Also