Show the timezone in the footer.

This commit is contained in:
James Brooks
2016-07-11 21:33:07 +01:00
parent e2da8ee1fa
commit 5298ad241a
7 changed files with 65 additions and 2 deletions
+13
View File
@@ -11,6 +11,7 @@
namespace CachetHQ\Cachet\Dates;
use DateTimeZone;
use Jenssegers\Date\Date;
class DateFactory
@@ -88,4 +89,16 @@ class DateFactory
{
return (new Date($time))->setTimezone($this->cachetTimezone);
}
/**
* Return the abbreviated timezone.
*
* @return string
*/
public function getTimezone()
{
$dateTime = new Date();
$dateTime->setTimeZone(new DateTimeZone($this->cachetTimezone));
return $dateTime->format('T');
}
}