. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Statistics\Repository; use Fisharebest\Webtrees\Functions\FunctionsDate; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Statistics\Repository\Interfaces\BrowserRepositoryInterface; /** * A repository providing methods for browser related statistics. */ class BrowserRepository implements BrowserRepositoryInterface { /** * @inheritDoc */ public function browserDate(): string { // TODO: Duplicates ServerRepository::serverDate return FunctionsDate::timestampToGedcomDate(WT_TIMESTAMP)->display(); } /** * @inheritDoc */ public function browserTime(): string { return date( str_replace('%', '', I18N::timeFormat()), WT_TIMESTAMP + WT_TIMESTAMP_OFFSET ); } /** * @inheritDoc */ public function browserTimezone(): string { return date('T', WT_TIMESTAMP + WT_TIMESTAMP_OFFSET); } }