Laserfiche WebLink
TSTool Documentation <br />2.2 Date /Time Conventions <br />TSTool uses date /time information in several ways: <br />Data values in time series are associated with a date /time and the precision of all date /time <br />information should be consistent within the time series, as discussed below, <br />The data interval indicates the time spacing between data points and is represented as a multiplier <br />(optional if 1) and a base (e.g., Day, 24Hour), <br />The period of a time series is defined by start and end date /time values, using an appropriate <br />precision, <br />An analysis period may be used to indicate when data processing should occur, <br />Output is typically formatted for calendar year (January to December), water year (October to <br />November), or irrigation year (November to October) — calendar year is the default but can be <br />changed in some commands and output. <br />A date /time has a precision. For example, 2 0 0 2 - 02 has a monthly precision and 2 0 0 2 - 02 - 01 has a <br />daily precision. Each date /time object knows its precision and "extra" date /time information is set to <br />reasonable defaults (e.g., hour, minute, and second for a monthly precision date /time are set to zero and <br />the day is set to 1). The date /time precision is important because TSTool uses the date /time objects to <br />iterate through data, to compare dates, and to calculate a plotting position for graphs. Specifying <br />date /time information with incorrect precision may cause inconsistent behavior. <br />The TSTool documentation and user interface typically use ISO 8601 International Standard formats for <br />date /time information. For example, dates are represented using YYYY -MM -DD and times are represented <br />using hh: mm: ss. A combined date /time is represented as YYYY -MM -DD hh : mm: ss. In order to <br />support common use, TSTool also attempts to handle date /time information that uses United States and <br />other date formats. In such cases, the length of the date /time string and the position of special characters <br />are used to make a reasonable estimate of the format. Using ambiguous formats (e.g., two -digit years that <br />may be confused with months) may cause errors in processing. Adhering to the ISO 8601, standard <br />formats will result in the fewest number of errors. The appendices for various input types discuss issues <br />with date /time formats. <br />Plotting positions are computed by converting dates to floating point values, where the whole number is <br />the year, and the fraction is the fractional part of the year, considering the precision. The floating -point <br />date is then interpolated to the screen pixels, as integers. In most cases, the high - precision date /time parts <br />are irrelevant because they default to zero. However, in some cases the precision can impact plots <br />significantly. For example, when plotting daily and monthly data on the same graph, the monthly data <br />will be plotted ignoring the day whereas the daily values correspond days 1 to 31. The ability to plot <br />monthly data mid -month or end -of -month has not been implemented. The TSView Time Series Viewing <br />Tools Appendix provides examples of plots. <br />The date /time precision is very important when performing an analysis or converting between time series <br />file formats. For example, a file may contain 6Hour data using a maximum hour of 24 (e.g., 6, 12, 18, <br />24). When reading this data, TSTool will convert the hour 24 values to hour 0 of the next day. <br />Consequently, the hour and day of the original data will seemingly be shifted, even though the data are <br />actually consistent. This shift may also be perceived when converting from hourly data to daily data <br />because the hour can have a value of 0 to 23, whereas days in the month start with 1. The perceived shift <br />is purely an artifact of time values having a minimum value of zero. <br />25 Introduction - 5 <br />