1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-06 03:02:34 +01:00
invoiceninja/app/Utils/Traits/MakesDates.php

27 lines
360 B
PHP
Raw Normal View History

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