I am working on a html/php code as shown below:
HTML/PHP Code:
<time datetime="<?php echo esc_attr(date_format($ts, 'H:i d-m-Y')) ?>"
data-timezone="<?php echo esc_attr($tz_param) ?>"><?php echo ucfirst(date_i18n( 'F j H:i', $ts->getTimeStamp())); ?>
</time>
The above html/php code displays the following on inspect:
<time datetime="02:15 19-07-2019" data-timezone="he">Juillet 19 06:15</time>
The time here Juillet 19 06:15
doesn't seems to match the time here 02:15 19-07-2019
which is inside the datetime attribute
On debugging print_r($ts)
, it prints:
DateTime Object
(
[date] => 2019-07-19 01:00:00.000000
[timezone_type] => 3
[timezone] => America/New_York
)
Problem Statement:
I am wondering what changes I should make in the php code so that the time here Juillet 19 06:15
should be equal to the time inside datetime attribute 02:15 19-07-2019