mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
27 lines
360 B
PHP
27 lines
360 B
PHP
<?php
|
|
|
|
namespace App\Utils\Traits;
|
|
|
|
/**
|
|
* Class MakesDates
|
|
* @package App\Utils\Traits
|
|
*/
|
|
trait MakesDates
|
|
{
|
|
|
|
public function createClientDate($utc_date , $timezone)
|
|
{
|
|
|
|
return $utc_date->setTimezone(new \DateTimeZone($timezone));
|
|
|
|
}
|
|
|
|
|
|
public function createUtcDate($client_date)
|
|
{
|
|
|
|
return $client_date->setTimezone(new \DateTimeZone('GMT'));
|
|
|
|
}
|
|
|
|
} |