fix для работы с vmangos
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use Carbon\CarbonImmutable;
|
||||
|
||||
class VMangosTime
|
||||
{
|
||||
public static function format(?string $value): string
|
||||
{
|
||||
// MySQL sessions for vMaNGOS read TIMESTAMP columns in UTC.
|
||||
return $value && ! str_starts_with($value, '0000-00-00')
|
||||
? CarbonImmutable::parse($value, 'UTC')->setTimezone(config('moonwell.timezone', 'UTC'))->format('d.m.Y H:i')
|
||||
: '—';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user