Hi Tharuna,
I am exporting an XML with the need to add the following timestamp in the header:
<lastupdate>2016-01-25T10:45:00Z</lastupdate>
I'm using a custom xml helper with the following code:
public function headerText($exportFields)
{
$header = $this->template->get('header', '', null, 2);
return str_ireplace('[datetime]', date('Y-m-d\TH:i:s'), $header);
}
I'm getting as a result: <lastupdate>2023-09-26T01:00:01</lastupdate> which is the correct date but the time does not update.
Any ideas on what I'm doing wrong?
Thanks!
D
- barracuda69
- RO CSVI
- Tuesday, 26 September 2023
- Subscribe via email