.. _structures-dontaddseconds: .. _don't-add-seconds: Don't Add Seconds +++++++++++++++++ Avoid adding seconds to a date, and use ``DateTime\:\:modify`` to add an interval. This method will handle situations like daylight savings, leap seconds and even leap days. .. code-block:: php modify('+1 day'); // Tomorrow, but may be not at the same hour $tomorrow = date('now') + 86400; ?> See also `DateTime::modify `_ and `datetime `_. Connex PHP features ------------------- + `date `_ Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/DontAddSeconds | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.3.9 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+