Home Explore Blog CI



postgresql

8th chunk of `doc/src/sgml/datetime.sgml`
0f12066dc7c9ecf49d11c7ae3942bde4c047118412b00ccb0000000100000fa1
 used
      for daylight-savings time.  If this field and the following ones are
      omitted, the zone uses a fixed UTC offset with no daylight-savings
      rule.
     </para>
    </listitem>
    <listitem>
     <para>
      <replaceable>dstoffset</replaceable> is the daylight-savings offset
      from UTC.  This field is typically omitted, since it defaults to one
      hour less than the standard-time <replaceable>offset</replaceable>,
      which is usually the right thing.
     </para>
    </listitem>
    <listitem>
     <para>
      <replaceable>rule</replaceable> defines the rule for when daylight
      savings is in effect, as described below.
     </para>
    </listitem>
   </itemizedlist>
  </para>

  <para>
   In this syntax, a zone abbreviation can be a string of letters, such
   as <literal>EST</literal>, or an arbitrary string surrounded by angle
   brackets, such as <literal>&lt;UTC-05&gt;</literal>.
   Note that the zone abbreviations given here are only used for output,
   and even then only in some timestamp output formats.  The zone
   abbreviations recognized in timestamp input are determined as explained
   in <xref linkend="datetime-config-files"/>.
  </para>

  <para>
   The offset fields specify the hours, and optionally minutes and seconds,
   difference from UTC.  They have the format
   <replaceable>hh</replaceable><optional><literal>:</literal><replaceable>mm</replaceable><optional><literal>:</literal><replaceable>ss</replaceable></optional></optional>
   optionally with a leading sign (<literal>+</literal>
   or <literal>-</literal>).  The positive sign is used for
   zones <emphasis>west</emphasis> of Greenwich.  (Note that this is the
   opposite of the ISO-8601 sign convention used elsewhere in
   <productname>PostgreSQL</productname>.)  <replaceable>hh</replaceable>
   can have one or two digits; <replaceable>mm</replaceable>
   and <replaceable>ss</replaceable> (if used) must have two.
  </para>

  <para>
   The daylight-savings transition <replaceable>rule</replaceable> has the
   format
<synopsis>
<replaceable>dstdate</replaceable> <optional> <literal>/</literal> <replaceable>dsttime</replaceable> </optional> <literal>,</literal> <replaceable>stddate</replaceable> <optional> <literal>/</literal> <replaceable>stdtime</replaceable> </optional>
</synopsis>
   (As before, spaces should not be included in practice.)
   The <replaceable>dstdate</replaceable>
   and <replaceable>dsttime</replaceable> fields define when daylight-savings
   time starts, while <replaceable>stddate</replaceable>
   and <replaceable>stdtime</replaceable> define when standard time
   starts.  (In some cases, notably in zones south of the equator, the
   former might be later in the year than the latter.)  The date fields
   have one of these formats:
   <variablelist>
    <varlistentry>
     <term><replaceable>n</replaceable></term>
     <listitem>
      <para>
       A plain integer denotes a day of the year, counting from zero to
       364, or to 365 in leap years.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><literal>J</literal><replaceable>n</replaceable></term>
     <listitem>
      <para>
       In this form, <replaceable>n</replaceable> counts from 1 to 365,
       and February 29 is not counted even if it is present.  (Thus, a
       transition occurring on February 29 could not be specified this
       way.  However, days after February have the same numbers whether
       it's a leap year or not, so that this form is usually more useful
       than the plain-integer form for transitions on fixed dates.)
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><literal>M</literal><replaceable>m</replaceable><literal>.</literal><replaceable>n</replaceable><literal>.</literal><replaceable>d</replaceable></term>
     <listitem>
      <para>
       This form specifies a transition that always happens during the same
       month and on the same day of the

Title: POSIX Time Zone Specification Details
Summary
The POSIX time zone specification format includes fields for standard time abbreviation, offset from UTC, daylight-savings time abbreviation, and offset, as well as a rule for when daylight savings is in effect, with specific formats for the offset fields, daylight-savings transition rule, and date fields, allowing for flexible and detailed time zone definitions.