PHP code example of xypp / flarum-localize-date-lib
1. Go to this page and download the library: Download xypp/flarum-localize-date-lib library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xypp / flarum-localize-date-lib example snippets
$newCarbonObj = $helper->z($carbonObj);//set timezone to the carbon object
$now = $helper->now();//get current time in target timezone