Ticket #8662: 8662-wp_current_time-2.patch

File 8662-wp_current_time-2.patch, 506 bytes (added by hakre, 4 years ago)

additional type providing the current time as timestamp gmt based.

  • wp-includes/functions.php

     
    6666                case 'timestamp': 
    6767                        return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * 3600 ); 
    6868                        break; 
     69                case 'timestampgmt': 
     70                        return ( $gmt ) ? strtotime(gmdate("Y-m-d H:i:s")) : strtotime(gmdate("Y-m-d H:i:s")) + ( get_option( 'gmt_offset' ) * 3600 ); 
     71                        break;  
    6972        } 
    7073} 
    7174