mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-31 21:48:36 +01:00
Remove PHP 5.1/Windows code from date_i18n. Allows timestamps from pre-1970. props DH-Shredder, fixes #10332.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
911af51915
commit
97c39c24a2
@ -84,16 +84,6 @@ function current_time( $type, $gmt = 0 ) {
|
||||
function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
|
||||
global $wp_locale;
|
||||
$i = $unixtimestamp;
|
||||
// Sanity check for PHP 5.1.0-
|
||||
if ( false === $i || intval($i) < 0 ) {
|
||||
if ( ! $gmt )
|
||||
$i = current_time( 'timestamp' );
|
||||
else
|
||||
$i = time();
|
||||
// we should not let date() interfere with our
|
||||
// specially computed timestamp
|
||||
$gmt = true;
|
||||
}
|
||||
|
||||
// store original value for language with untypical grammars
|
||||
// see http://core.trac.wordpress.org/ticket/9396
|
||||
|
Loading…
Reference in New Issue
Block a user