Changeset 27259 for trunk/src/wp-includes/functions.php
- Timestamp:
- 02/25/2014 05:00:36 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r27158 r27259 47 47 * The 'mysql' type will return the time in the format for MySQL DATETIME field. 48 48 * The 'timestamp' type will return the current timestamp. 49 * Other strings will be interpreted as PHP date formats (e.g. 'Y-m-d'). 49 50 * 50 51 * If $gmt is set to either '1' or 'true', then both types will use GMT time. … … 53 54 * @since 1.0.0 54 55 * 55 * @param string $type Either 'mysql' or 'timestamp'.56 * @param string $type 'mysql', 'timestamp', or PHP date format string (e.g. 'Y-m-d'). 56 57 * @param int|bool $gmt Optional. Whether to use GMT timezone. Default is false. 57 58 * @return int|string String if $type is 'gmt', int if $type is 'timestamp'. … … 64 65 case 'timestamp': 65 66 return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); 67 break; 68 default: 69 return ( $gmt ) ? date( $type ) : date( $type, time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ); 66 70 break; 67 71 }
Note: See TracChangeset
for help on using the changeset viewer.