PHPackages                             webteractive/filament-browser-timezone - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webteractive/filament-browser-timezone

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webteractive/filament-browser-timezone
======================================

A Filament plugin to detect user's browser timezone and make it available to Tables, Forms, and Infolist via session

1.6.0(1mo ago)12.0k↑140%[1 issues](https://github.com/webteractive/filament-browser-timezone/issues)MITPHPPHP ^8.2CI passing

Since Aug 10Pushed 1mo agoCompare

[ Source](https://github.com/webteractive/filament-browser-timezone)[ Packagist](https://packagist.org/packages/webteractive/filament-browser-timezone)[ Docs](https://github.com/webteractive/filament-browser-timezone)[ RSS](/packages/webteractive-filament-browser-timezone/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (45)Versions (15)Used By (0)

Filament Browser Timezone
=========================

[](#filament-browser-timezone)

A Filament package that automatically detects the user's browser timezone and makes it available to Filament resources, forms, and widgets via session storage.

Features
--------

[](#features)

- 🕐 **Automatic Detection**: Detects browser timezone on page load
- 🔒 **Session Storage**: Stores timezone in Laravel session for backend access
- 🎯 **Filament Integration**: Seamlessly integrates with Filament v3, v4, and v5 via render hooks
- 🚀 **Zero Configuration**: Works out of the box with default settings
- 🛡️ **Error Handling**: Graceful fallbacks for unsupported browsers
- ⚡ **Performance Optimized**: Minimal impact on page load performance
- 🤖 **AI-Friendly**: Includes Laravel AI custom guidelines for better AI-assisted development

Installation
------------

[](#installation)

```
composer require webteractive/filament-browser-timezone
```

The package will be automatically discovered by Laravel.

Usage
-----

[](#usage)

### Automatic Integration

[](#automatic-integration)

The package automatically integrates with Filament and starts detecting timezone on every page load. No additional configuration required.

### Accessing Browser Timezone

[](#accessing-browser-timezone)

#### In Filament Resources, Forms, and Widgets

[](#in-filament-resources-forms-and-widgets)

```
use Webteractive\FilamentBrowserTimezone\BrowserTimezone;

// Get the detected timezone
$timezone = BrowserTimezone::get();

// Check if timezone is available
if (BrowserTimezone::has()) {
    $timezone = BrowserTimezone::get();
}

// Get with fallback
$timezone = BrowserTimezone::get('UTC');
```

#### In Filament Tables

[](#in-filament-tables)

```
use Webteractive\FilamentBrowserTimezone\BrowserTimezone;

class UserResource extends Resource
{
    public function table(Table $table): Table
    {
        return $table
            ->columns([
                TextColumn::make('created_at')
                    ->dateTime()
                    ->timezone(BrowserTimezone::get())
                    ->label('Created At'),
            ]);
    }
}
```

#### In Filament Forms

[](#in-filament-forms)

```
use Webteractive\FilamentBrowserTimezone\BrowserTimezone;

class UserForm extends Form
{
    public function form(Form $form): Form
    {
        return $form
            ->schema([
                DateTimePicker::make('meeting_time')
                    ->timezone(BrowserTimezone::get())
                    ->label('Meeting Time'),
            ]);
    }
}
```

#### In Filament Widgets

[](#in-filament-widgets)

```
use Webteractive\FilamentBrowserTimezone\BrowserTimezone;

class StatsWidget extends Widget
{
    public function getColumns(): int
    {
        return 2;
    }

    protected function getTableQuery(): Builder
    {
        return User::query()
            ->where('created_at', '>=', now()->setTimezone(BrowserTimezone::get()));
    }
}
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag="filament-browser-timezone-config"
```

### Configuration Options

[](#configuration-options)

```
// config/filament-browser-timezone.php

return [
    // Session key for storing timezone
    'session_key' => env('BROWSER_TIMEZONE_SESSION_KEY', 'browser_timezone'),

    // Fallback timezone if detection fails
    'fallback_timezone' => env('BROWSER_TIMEZONE_FALLBACK', 'UTC'),

    // Debug mode
    'debug' => env('BROWSER_TIMEZONE_DEBUG', false),
];
```

### Environment Variables

[](#environment-variables)

```
BROWSER_TIMEZONE_SESSION_KEY=browser_timezone
BROWSER_TIMEZONE_FALLBACK=UTC
BROWSER_TIMEZONE_DEBUG=false
```

How It Works
------------

[](#how-it-works)

1. **Automatic Integration**: The package automatically integrates with Filament panels using render hooks
2. **Page Load**: When a Filament page loads, the package automatically includes a hidden Livewire component
3. **JavaScript Detection**: The component uses JavaScript to detect the browser's timezone using `Intl.DateTimeFormat().resolvedOptions().timeZone`
4. **Session Storage**: The detected timezone is sent to the server via Livewire and stored in the Laravel session
5. **Filament Integration**: Your Filament resources, forms, and widgets can now access the timezone using the `BrowserTimezone` helper class

Filament Features
-----------------

[](#filament-features)

- **Automatic Detection**: Works out of the box with all Filament panels
- **Render Hook Integration**: Uses Filament's render hook system for seamless integration
- **Livewire Component**: Built with Livewire for optimal performance
- **Session Management**: Integrates with Laravel's session system

Browser Compatibility
---------------------

[](#browser-compatibility)

The package uses the modern `Intl.DateTimeFormat` API which is supported by:

- Chrome 24+
- Firefox 29+
- Safari 10+
- Edge 12+

For unsupported browsers, the package will use the configured fallback timezone.

Version Compatibility
---------------------

[](#version-compatibility)

Package VersionFilament VersionLivewire VersionLaravel VersionPHP Version1.x^3.0||^4.0||^5.0^3.0||^4.0^10.0||^11.28||^12.0||^13.0^8.2**Note**: Filament v3 and v4 use Livewire v3, while Filament v5 uses Livewire v4. This package supports both Livewire versions seamlessly.

Laravel AI Guidelines
---------------------

[](#laravel-ai-guidelines)

This package includes custom AI guidelines for Laravel 12.x AI features. When using AI assistants with Laravel 12.x projects, the assistant will have access to comprehensive documentation about this package's usage patterns, best practices, and troubleshooting tips.

The AI guidelines are located in `ai/custom-guidelines.md` and provide:

- Complete API reference
- Common usage patterns for Tables, Forms, and Widgets
- Troubleshooting guides
- Best practices and examples
- Common mistakes to avoid

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance72

Regular maintenance activity

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~28 days

Recently: every ~61 days

Total

11

Last Release

41d ago

PHP version history (2 changes)v1.0.0PHP ^8.3

1.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9cd718c82f37ed135a350effd6b2b7c3a75a815a029bbfccbf8c777d1aa3184?d=identicon)[hadefication](/maintainers/hadefication)

---

Top Contributors

[![hadefication](https://avatars.githubusercontent.com/u/6673244?v=4)](https://github.com/hadefication "hadefication (44 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

browserlaravellivewirefilamenttimezoneWebteractive

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/webteractive-filament-browser-timezone/health.svg)

```
[![Health](https://phpackages.com/badges/webteractive-filament-browser-timezone/health.svg)](https://phpackages.com/packages/webteractive-filament-browser-timezone)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[asosick/filament-layout-manager

Allow users to create &amp; customize their own FilamentPHP pages composed of Livewire components

5822.2k3](/packages/asosick-filament-layout-manager)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)[ercogx/laravel-filament-starter-kit

This is a Filament v5 Starter Kit for Laravel 13, designed to accelerate the development of Filament-powered applications.

461.7k](/packages/ercogx-laravel-filament-starter-kit)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

197.8k17](/packages/wsmallnews-filament-nestedset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
