Fixed timezone bug in current_time function
This commit is contained in:
parent
5a59a56abc
commit
af0d25ffe4
|
@ -72,8 +72,8 @@ function mysql2date( $format, $date, $translate = true ) {
|
|||
*/
|
||||
function current_time( $type, $gmt = 0 ) {
|
||||
// Don't use non-GMT timestamp, unless you know the difference and really need to.
|
||||
if ( 'timestamp' === $type || 'U' === $type ) {
|
||||
return $gmt ? time() : time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
|
||||
if ( 'timestamp' === $type ) {
|
||||
$type = 'U';
|
||||
}
|
||||
|
||||
if ( 'mysql' === $type ) {
|
||||
|
|
Loading…
Reference in New Issue