Answers for "php set time"

PHP
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
2

php time

<?php
$t=time();
echo($t . "<br>");
echo(date("Y-m-d",$t));
?>
Posted by: Guest on June-24-2020

Browse Popular Code Answers by Language