strtotime

List of timestamp function available in PHP

When I was working in date and time type of module, I came to know about the timestamp format.  But on that time I used strtime and mktime function from PHP.

After that I was analysing about timestamp in PHP, below are the timestamp function available in PHP. So I want to share the function for timestamp.

Most of us not use all the function to get unix timestamp, each one is having its own feature to display timestamp.

strtotime : this function display unix timestamp from number of seconds since January 1 1970 00:00:00 UTC, for the timestamp given in now.

<?php
echo strtotime("now");

mktime : return unix timestamp for the given date and time, between number of seconds since January 1 1970 00:00:00 UTC.  Need to pass arguments for hour, minutes, seconds, month, day and year. Continue reading…