Answers for "set time php"

PHP
2

php current time

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

//Output something like this:
//2021-07-30 10:07:45
Posted by: Guest on July-30-2021
6

php default timezone

date_default_timezone_set("Asia/Kolkata");
// List of Supported Timezones https://www.php.net/manual/en/timezones.php
Posted by: Guest on May-18-2020
3

time php

<?php 
/* Unix Timestamp */
$timestamp = time();
echo $timestamp . "<br>";
echo date("d/m/Y", $timestamp);
?>
Posted by: Guest on October-06-2020
1

php date set utc hours

<?php
date_default_timezone_set('America/Los_Angeles');
?>
Posted by: Guest on March-06-2020

Browse Popular Code Answers by Language