Skip to content
Advertisement

Why does it display the wrong date in php

Note: Please don’t mark this as duplicate This is not related to other questions as they all have incorrect timezone while I don’t and the time getting displayed is literally January 01, 1970, 05:00:00 although it is May 19, 2020, 12:19:00 right now.

I am using the PHP date function for this

JavaScript

Advertisement

Answer

If you don’t include $timestamp it will give you the current date, which is what you want I assume:

JavaScript

See the manual for more details.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement