Working with dates and times in PHP
(Page 1 of 4 )
In this tutorial, Hermawan will show you how to use the date and time functions of PHP.
Let's discuss dates and times and how we use them in PHP projects. The date and time functions allow you to use the time of the server that PHP is running on so keep in mind that this function will depend on the local setting of your server.
First Step
Now, the first step is we have to know what value the time function in PHP produces. Run this code on your server:
You will see a line of numbers in your browser. That is the number of seconds since the epoch. The epoch was on January 1st 1970. This line of numbers is called a UNIX timestamp.
Next: Human Readable Formats >>
More Miscellaneous Articles
More By Hermawan Haryanto