This question already has an answer here:
I need to get current time in UTC to store in in datetime field(2019-08-17 00:00:00) type in MySQL.
How to get it in PHP?
I tried: now();
it gives me milliseconds
</div>
This question already has an answer here:
I need to get current time in UTC to store in in datetime field(2019-08-17 00:00:00) type in MySQL.
How to get it in PHP?
I tried: now();
it gives me milliseconds
</div>
You should find info about the DateTime class to work with dates in php
$d = new DateTime('now');
$d->setTimezone(new DateTimeZone('UTC'));
echo $d->format('Y-m-d H:i:s');