Why in Mongo Timestamp 2 dates?



  • increment there for what? What's that? http://php.net/manual/en/mongodb-bson-timestamp.construct.php



  • https://docs.mongodb.com/manual/reference/bson-types/#timestamps

    The BSON timestamp type is for internal MongoDB use. For most cases, in application development, you will want to use the BSON date type.

    This type of data is intended for internal use mongodb and should not normally be used outside.

    As it says, within one instant mongod field timestamp Must always be unique. increment - A different number with little meaning to create unique identifiers within one second of the unix era.

    I repeat, this type of data doesn't have to be used. Use the type. Date instead of him. Moreover, in contrast to timestamp, Date 64-bit and not prone to the 2038 problem, which is no longer in such a vague future as it may seem, it has been less than 22 years.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2