<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="events-metadata">
      </a>
      27.4.4 Event Metadata
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045082098112">
  </a>
  <a class="indexterm" name="idm46045082096624">
  </a>
  <p>
   To obtain metadata about events:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Query the
      <a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
       <code class="literal">
        EVENTS
       </code>
      </a>
      table of the
      <code class="literal">
       INFORMATION_SCHEMA
      </code>
      database. See
      <a class="xref" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
       Section 28.3.14, “The INFORMATION_SCHEMA EVENTS Table”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      Use the
      <a class="link" href="show-create-event.html" title="15.7.7.8 SHOW CREATE EVENT Statement">
       <code class="literal">
        SHOW CREATE EVENT
       </code>
      </a>
      statement. See
      <a class="xref" href="show-create-event.html" title="15.7.7.8 SHOW CREATE EVENT Statement">
       Section 15.7.7.8, “SHOW CREATE EVENT Statement”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      Use the
      <a class="link" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
       <code class="literal">
        SHOW EVENTS
       </code>
      </a>
      statement.
          See
      <a class="xref" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
       Section 15.7.7.19, “SHOW EVENTS Statement”
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   <span class="bold">
    <strong>
     Event Scheduler Time
      Representation
    </strong>
   </span>
  </p>
  <a class="indexterm" name="idm46045082084240">
  </a>
  <a class="indexterm" name="idm46045082082752">
  </a>
  <p>
   Each session in MySQL has a session time zone (STZ). This is the
      session
   <a class="link" href="server-system-variables.html#sysvar_time_zone">
    <code class="literal">
     time_zone
    </code>
   </a>
   value that is
      initialized from the server's global
   <a class="link" href="server-system-variables.html#sysvar_time_zone">
    <code class="literal">
     time_zone
    </code>
   </a>
   value when the session
      begins but may be changed during the session.
  </p>
  <p>
   The session time zone that is current when a
   <a class="link" href="create-event.html" title="15.1.13 CREATE EVENT Statement">
    <code class="literal">
     CREATE EVENT
    </code>
   </a>
   or
   <a class="link" href="alter-event.html" title="15.1.3 ALTER EVENT Statement">
    <code class="literal">
     ALTER EVENT
    </code>
   </a>
   statement executes is
      used to interpret times specified in the event definition. This
      becomes the event time zone (ETZ); that is, the time zone that is
      used for event scheduling and is in effect within the event as it
      executes.
  </p>
  <p>
   For representation of event information in the data dictionary,
      the
   <code class="literal">
    execute_at
   </code>
   ,
   <code class="literal">
    starts
   </code>
   , and
   <code class="literal">
    ends
   </code>
   times are converted to UTC and stored
      along with the event time zone. This enables event execution to
      proceed as defined regardless of any subsequent changes to the
      server time zone or daylight saving time effects. The
   <code class="literal">
    last_executed
   </code>
   time is also stored in UTC.
  </p>
  <p>
   Event times can be obtained by selecting from the Information
      Schema
   <a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
    <code class="literal">
     EVENTS
    </code>
   </a>
   table or from
   <a class="link" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
    <code class="literal">
     SHOW EVENTS
    </code>
   </a>
   , but they are reported
      as ETZ or STZ values. The following table summarizes
      representation of event times.
  </p>
  <div class="informaltable">
   <table summary="Summary of event time representation (as UTC, EZT, or STZ values) from INFORMATION_SCHEMA.EVENTS, and SHOW EVENTS.">
    <colgroup>
     <col style="width: 25%"/>
     <col style="width: 25%"/>
     <col style="width: 25%"/>
    </colgroup>
    <thead>
     <tr>
      <th scope="col">
       Value
      </th>
      <th scope="col">
       <a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
        <code class="literal">
         EVENTS
        </code>
       </a>
       Table
      </th>
      <th scope="col">
       <a class="link" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
        <code class="literal">
         SHOW EVENTS
        </code>
       </a>
      </th>
     </tr>
    </thead>
    <tbody>
     <tr>
      <th scope="row">
       Execute at
      </th>
      <td>
       ETZ
      </td>
      <td>
       ETZ
      </td>
     </tr>
     <tr>
      <th scope="row">
       Starts
      </th>
      <td>
       ETZ
      </td>
      <td>
       ETZ
      </td>
     </tr>
     <tr>
      <th scope="row">
       Ends
      </th>
      <td>
       ETZ
      </td>
      <td>
       ETZ
      </td>
     </tr>
     <tr>
      <th scope="row">
       Last executed
      </th>
      <td>
       ETZ
      </td>
      <td>
       n/a
      </td>
     </tr>
     <tr>
      <th scope="row">
       Created
      </th>
      <td>
       STZ
      </td>
      <td>
       n/a
      </td>
     </tr>
     <tr>
      <th scope="row">
       Last altered
      </th>
      <td>
       STZ
      </td>
      <td>
       n/a
      </td>
     </tr>
    </tbody>
   </table>
  </div>
 </div>
 <br/>
</div>
