From GridLAB-D Wiki
Jump to: navigation, search
Main Runtime Q&A Next

Timestamp problems

  • Run fails with message "expected time value"
    The timezone was given before the timezone was set or the timezone used in the timestamp was not the same as the timezone specified. Before using a timezone a clock block must be declared and the timezone must be specified, e.g.,

 clock {
   timezone PST+8PDT;
   timestamp '2000-01-01 00:00:00 PST';

  • Timestamps appear to be in GMT
    The timestamp was used without a timezone and no timezone was specified. The default timezone is GMT.
  • Warning "Local TZ is empty "
    This warning message means that GridLAB-D was unable to locate the environment variable "TZ", which is used to define the default local timezone. To change this in Windows XP, open the start menu, right-click on "My Computer", select "Properties", go to the "Advanced" tab, click on "Environment Variables", then create a new variable that specifies the timezone. For example, the Western US timezone is "PST+8PDT". The first three character are the standard timezone abbreviation, then the number of hours for the UTC time offset. If daylight savings time is used, the DST abbreviation needs to follow the hour offset.