The date() function formats a local date and time, and returns a formatted string. Use mktime() function to create a timestasmp based on the year, month, day, hour, minute, and second.Subtract time (hours, minutes, and seconds) from date can be easily done using the date() and strtotime() function in PHP.Use the date() function to format the timestamp. Use the date_default_timezone_set() function to set a specific timezone.Use the time() function to return the current timestamp since Epoch in local timezone.The following example shows how to use the mktime() function to show that July 13, 2020, is on a Tuesday:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |