How to add timestamp in php: You can use the mktime() function to add it. This function returns the UNIX timestamp of a date, or FALSE if it is an error. The specific usage is as follows: [mktime(0,0,0,date("m"),date("d") 1,date("Y"))].
The mktime() function returns the UNIX timestamp of a date, or FALSE on error.
(Recommended tutorial: php graphic tutorial)
Syntax:
mktime(hour,minute,second,month,day,year,is_dst);
Parameters:
hour is optional. Specified hours.
#minute Optional. prescribed points.
#second Optional. Specifies seconds.
#month Optional. Specified month.
day Optional. Specify days.
#year Optional. Specified year.
is_dst Optional. Set to 1 if the time is during daylight saving time, 0 otherwise, or -1 (default) if unknown.
(Video tutorial recommendation: php video tutorial)
Code implementation:
<?php $tomorrow = mktime(0,0,0,date("m"),date("d")+1,date("Y")); echo "Tomorrow is ".date("Y/m/d", $tomorrow); ?>
Output result:
Tomorrow is 2009/05/12
The above is the detailed content of How to add timestamp in php. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version
Useful JavaScript development tools
