Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #24730, comment 11


Ignore:
Timestamp:
06/29/2018 11:50:18 AM (5 years ago)
Author:
remcotolsma
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24730, comment 11

    v1 v2  
    2626
    2727You can easily test it with PHP <= 5.3 on http://sandbox.onlinephpfunctions.com/.
    28 
    29 But that is easy to work around:
    30 
    31 {{{#!php
    32 <?php
    33 
    34 $date_1 = new DateTime( '+12:45' );
    35 
    36 $timezone = $date_1->getTimezone();
    37 
    38 $date_2 = new DateTime( 'now', $timezone );
    39 
    40 echo $date_2->format( DATE_W3C );
    41 }}}
    4228
    4329Side Note: I'm not a big fan of all the `preg_replace` calls in the `date_i18n` function: