<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/mongodb.bson.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'class.mongodb-bson-timestamp.php',
    1 => 'MongoDB\\BSON\\Timestamp',
    2 => 'La clase MongoDB\\BSON\\Timestamp',
  ),
  'up' => 
  array (
    0 => 'mongodb.bson.php',
    1 => 'MongoDB\\BSON',
  ),
  'prev' => 
  array (
    0 => 'mongodb-bson-regex.tostring.php',
    1 => 'MongoDB\\BSON\\Regex::__toString',
  ),
  'next' => 
  array (
    0 => 'mongodb-bson-timestamp.construct.php',
    1 => 'MongoDB\\BSON\\Timestamp::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/mongodb/bson/timestamp.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.mongodb-bson-timestamp.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.mongodb-bson-timestamp" class="reference">

 <h1 class="title">La clase MongoDB\BSON\Timestamp</h1>
 

 <div class="partintro"><p class="verinfo">(mongodb &gt;=1.0.0)</p>


  <div class="section" id="mongodb-bson-timestamp.intro">
   <h2 class="title">Introducción</h2>
   <p class="para">
    Representa un
    <a href="https://www.mongodb.com/docs/manual/reference/bson-types/#timestamps" class="link external">&raquo;&nbsp;horodatage BSON</a>,
    el valor se compone de un horodatage de 4 bytes (i.e. segundos desde
    la época) y un incremento de 4 bytes.
   </p>
   <blockquote class="note"><p><strong class="note">Nota</strong>: 
    <span class="simpara">
     Se trata de un tipo interno de MongoDB utilizado para la replicación y la
     fragmentación. No está previsto para el almacenamiento de fechas generales
     (<span class="classname"><a href="class.mongodb-bson-utcdatetime.php" class="classname">MongoDB\BSON\UTCDateTime</a></span> debe ser utilizado en su lugar).
    </span>
   </p></blockquote>
  </div>


  <div class="section" id="mongodb-bson-timestamp.synopsis">
   <h2 class="title">Sinopsis de la Clase</h2>


   <div class="classsynopsis">
    <span class="ooclass"><strong class="classname"></strong></span>


    <div class="classsynopsisinfo">
     <span class="modifier">final</span>
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">MongoDB\BSON\Timestamp</strong>
     </span>

     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.mongodb-bson-timestampinterface.php" class="interfacename">MongoDB\BSON\TimestampInterface</a></span><span class="oointerface">,  <a href="class.mongodb-bson-type.php" class="interfacename">MongoDB\BSON\Type</a></span><span class="oointerface">,  <a href="class.jsonserializable.php" class="interfacename">JsonSerializable</a></span><span class="oointerface">,  <a href="class.stringable.php" class="interfacename">Stringable</a></span> {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Métodos */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.construct.php" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$increment</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$timestamp</code></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.getincrement.php" class="methodname">getIncrement</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.gettimestamp.php" class="methodname">getTimestamp</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.jsonserialize.php" class="methodname">jsonSerialize</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><strong>BSON\Timestamp::__toString</strong></span>(): <span class="type">ReturnType</span></div>

   }</div>


  </div>

  <div class="section">
   <h2 class="title">Historial de cambios</h2>
   <p class="para">
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>Versión</th>
        <th>Descripción</th>
       </tr>

      </thead>

      <tbody class="tbody">
       
    <tr>
        <td>PECL mongodb 2.0.0</td>
        <td>
            <p class="para">
                Esta clase ya no implementa la interfaz
                <span class="interfacename"><a href="class.serializable.php" class="interfacename">Serializable</a></span>.
            </p>
        </td>
    </tr>


       <tr>
        <td>PECL mongodb 1.12.0</td>
        <td>
         Implementa <span class="interfacename"><a href="class.stringable.php" class="interfacename">Stringable</a></span> para PHP 8.0+.
        </td>
       </tr>

       <tr>
        <td>PECL mongodb 1.3.0</td>
        <td>
         Implementa <span class="interfacename"><a href="class.mongodb-bson-timestampinterface.php" class="interfacename">MongoDB\BSON\TimestampInterface</a></span>.
        </td>
       </tr>

       <tr>
        <td>PECL mongodb 1.2.0</td>
        <td>
         Implementa <span class="interfacename"><a href="class.serializable.php" class="interfacename">Serializable</a></span> y
         <span class="interfacename"><a href="class.jsonserializable.php" class="interfacename">JsonSerializable</a></span>.
        </td>
       </tr>

      </tbody>
     
    </table>

   </p>
  </div>

 </div>

 













































<h2>Tabla de contenidos</h2><ul class="chunklist chunklist_reference"><li><a href="mongodb-bson-timestamp.construct.php">MongoDB\BSON\Timestamp::__construct</a> — Construye un nuevo Timestamp</li><li><a href="mongodb-bson-timestamp.getincrement.php">MongoDB\BSON\Timestamp::getIncrement</a> — Devuelve el componente de incremento de este Timestamp</li><li><a href="mongodb-bson-timestamp.gettimestamp.php">MongoDB\BSON\Timestamp::getTimestamp</a> — Devuelve el componente de timestamp de Timestamp</li><li><a href="mongodb-bson-timestamp.jsonserialize.php">MongoDB\BSON\Timestamp::jsonSerialize</a> — Devuelve una representaci&oacute;n que puede ser convertida en JSON</li><li><a href="mongodb-bson-timestamp.tostring.php">MongoDB\BSON\Timestamp::__toString</a> — Devuelve la representaci&oacute;n en forma de string de este timestamp</li></ul>
</div>
<?php manual_footer($setup); ?>