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