1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Utils/Traits/MakesTimezoneAdjustment.php

30 lines
416 B
PHP
Raw Normal View History

<?php
namespace App\Utils\Traits;
/**
* Class MakesTimezoneAdjustment
* @package App\Utils\Traits
*/
trait MakesTimezoneAdjustment
{
public function createClientDate($utc_date , $timezone)
{
2019-04-22 14:17:52 +02:00
$utc_date->setTimezone(new \DateTimeZone($timezone));
return $utc_date;
}
2019-04-22 14:17:52 +02:00
public function createUtcDate($client_date)
{
2019-04-22 14:17:52 +02:00
$client_date->setTimezone(new \DateTimeZone('GMT'));
return $client_date;
}
}