WordPress.org

Making WordPress.org

Changeset 6209


Ignore:
Timestamp:
12/03/2017 05:28:31 PM (6 months ago)
Author:
iandunn
Message:

Events: Define DAY_IN_SECONDS to improve readability.

Props metalandcoffee for the initial patch
See #2994

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/events/1.0/index.php

    r6208 r6209  
    2424    define( 'THROTTLE_GEONAMES',    0 );
    2525    define( 'THROTTLE_IP2LOCATION', 0 );
     26
     27    defined( 'DAY_IN_SECONDS' ) or define( 'DAY_IN_SECONDS', 60 * 60 * 24 );
    2628
    2729    // The test suite just needs the functions defined and doesn't want any headers or output
     
    696698    // Dates are in local-time not UTC, so the API output will contain events that have already happened in some parts of the world.
    697699    // TODO update this when the UTC dates are stored.
    698     $sql_values[] = gmdate( 'Y-m-d', time() - ( 24 * 60 * 60 ) );
     700    $sql_values[] = gmdate( 'Y-m-d', time() - DAY_IN_SECONDS );
    699701
    700702    // Limit
Note: See TracChangeset for help on using the changeset viewer.