PHP gmdate() Function
The gmdate() function formats a GMT/UTC date/time. It
behaves exactly like date() except that the time returned is
Greenwich Mean Time (GMT).
Syntax
gmdate(string $format, ?int $timestamp = null): string
Try It Online
Output
Click Run to execute your code
Related Functions
- date() - Format a local time/date
- gmmktime() - Get Unix timestamp for a GMT date
Enjoying these tutorials?