Sagy C
Sagy C

Reputation: 37

PHP i need to do this timestamp in php date function

I'm trying to do this timestamp in php 2019-02-01T08:21:33+0000.

date("Y-m-d") 

What do i need to add to the function date in order to create this timestamp.

Upvotes: 2

Views: 49

Answers (2)

Rikal
Rikal

Reputation: 225

date('c') // c - The ISO-8601 date format.

Upvotes: 0

Wiimm
Wiimm

Reputation: 3572

A look into the docu helps: https://www.php.net/manual/en/function.date.php

And the solution is:

date('c')

(with an additional colon)

Upvotes: 4

Related Questions