php时间戳
$time = strtotime(date('Y-m-d'));
echo date('y-m-d h:i:s', $time);
为什么打出来
16-05-17 12:00:00
不应该是16-05-17 00:00:00
回复讨论(解决方案)
echo date('y-m-d H:i:s', $time);
h 12 小时格式,有前导零 01 到 12
当前时间:
echo date("Y-m-d H:i:s",time())
echo date('y-m-d H:i:s', $time);
要这么逗比不?原因是?小写代表12小时制
拜托你看看手册

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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The timestamp refers to the number of seconds from 0:00:00 on January 1, 1970 to the present. In PHP, you can obtain the current system timestamp through the time() function, or convert a time string into a timestamp through the strtotime() function. So, how many digits is the PHP timestamp?

PHP timestamps are generally 10 digits. Method for calculating the number of digits in a PHP timestamp: 1. Use the time() function to obtain the current timestamp. The syntax "$time = time();" will return the integer value string of the UNIX timestamp; 2. Use the strlen() function Just find the length of the timestamp, the syntax is "$len=strlen($time);".

With the continuous development and popularization of the Internet era, Web development technology is constantly being applied and explored by people. As a commonly used web application development language and a widely used server-side scripting language, PHP is favored and used by more and more web developers. In PHP development, time management is also a very important issue. This article will introduce how to convert time into timestamp in PHP.

PHP is a very popular programming language used by many people to develop web applications and websites. When dealing with timestamps, you may need to convert the 13-digit timestamp to a standard timestamp. In this article, I will show you how to convert a 13-digit timestamp to a standard timestamp in PHP.

In PHP, timestamp is a very commonly used concept. A timestamp can be used to record the specific time when an event occurs. It usually consists of the year, month, and day representing the date, and the hour, minute, second, millisecond, etc. representing the time. In PHP, we can use timestamps to operate and calculate time. However, under the POSIX standard, the timestamp length is only 10 digits. If you need to save millisecond-level times, you need to use a 13-bit timestamp. So, if you need to convert a 13-digit timestamp in PHP, how to do it?

When developing web pages and applications, time is often a very critical factor. The PHP language provides many functions for time processing, among which the timestamp function is one of the most commonly used functions. A timestamp is a number that represents when an event occurred. Typically, the timestamp is the number of seconds since January 1, 1970. PHP provides functions that convert timestamps into human-readable date formats, such as the date() function. But what if we need to convert the timestamp into a day of the week? This article will introduce how to convert timestamp to star using PHP

With the continuous development of Internet technology, PHP has become a very popular web development language. In PHP development, timestamp is a very important data type. In some applications that need to calculate date and time, using timestamps can greatly simplify code writing and maintenance, and improve code performance. In this article, we will detail how to convert year, month and day into timestamp.

PHP is one of the most popular server scripting languages used for web development, especially dynamic web development. With the popularity of mobile Internet, timestamps have become more and more common in web development, so converting timestamps into date and time in a specific format in PHP is a very important skill. This article will introduce how to convert timestamps in PHP, as well as time zone settings.
