simply use: date("Y-m-d H:i:s")
this will give you your date and time like '2020-08-22 12:20:30' this .
add date_default_timezone_set("your time zone")
before date() function to get the time date of your area/zone.
here you can find you time zone