1. barracuda69
  2. RO CSVI
  3. Tuesday, 26 September 2023
  4.  Subscribe via email
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
Sorry, the discussion is currently locked. You will not be able to post a reply or a comment at the moment.