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

30 lines
390 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)
{
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;
}
}