Теперь() в php

Примеры кода

17
0

php получить текущую дату и время

$today = date("F j, Y, g:i a");   // October 30, 2019, 10:42 pm
$today = date("D M j G:i:s T Y"); // Wed Oct 30 22:42:18 UTC 2019
$today = date("Y-m-d H:i:s");     // 2019-10-30 22:42:18(MySQL DATETIME format)
6
0

дата сейчас php

date('Y-m-d H:i:s')
2
0

как установить дату в php

// 1. create a date instance
$date = new DateTime;

// 2. set the date using the setDate(year, month, date) method on the
//    $date instance
$date->setDate(1999,02,19);
2
0

php сейчас

// In my case I want to print to log my zone time (Rome GMT +2)
// without changing the default timezone
// Add +2 hours respect to php time
$new_time = date("Y-m-d H:i:s", strtotime('+2 hours'));
1
0

php получить текущий формат datetime mysql

date('Y-m-d H:i:s');
1
0

дата сейчас php

date("Y-m-d H:i:s");
0
0

функция времени в php

Return the current time as a Unix timestamp, then format it to a date:
<?php 
/* Unix Timestamp */
$timestamp = time();
echo $timestamp . "<br>";
echo date("d/m/Y", $timestamp);
?>

Похожие страницы

Похожие страницы с примерами

На других языках

Эта страница на других языках

English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................