Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to get local current time in laravel

$dt = new DateTime($posts->updated_at);
$tz = new DateTimeZone('Asia/Kolkata'); // or whatever zone you're after

$dt->setTimezone($tz);
echo $dt->format('Y-m-d H:i:s');
Comment

PREVIOUS NEXT
Code Example
Php :: http error 500 - php file 
Php :: web scraping php 
Php :: In PackageManifest.php line 122: 
Php :: php sort array by specific key 
Php :: simple localhost php 
Php :: check which database connect laravel 
Php :: fetch value from json link in php 
Php :: laravel random value from array 
Php :: laravel-medialibrary change name of file 
Php :: get value from json laravel 
Php :: php isset multiple 
Php :: laravel auth user_id 
Php :: flutter network image svg 
Php :: wp php redirect my account page url to custom url 
Php :: get all category custom post type wordpress dev 
Php :: laravel migration index 
Php :: date_sub laravel 7 
Php :: php zeilenumbruch 
Php :: php short string 
Php :: hide error in php 
Php :: get country from ip address 
Php :: Notice: Trying to access array offset on value of type int in /var/www/pdam/modules/phpexcel/PHPExcel/Cell/DefaultValueBinder.php on line 82 
Php :: vscode open php tag autocomplete 
Php :: how to prompt user for input in php 
Php :: Pass all data to all pages laravel 
Php :: random string generator php 
Php :: laravel 8 route 
Php :: php filter array contain valu 
Php :: laravel duplicate row 
Php :: laravel collection slice 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =