🕐 Timezone Diagnostic

--:--:--

Your Browser Time (IST)

🐘 PHP

Timezone {{ $phpTimezone }}
Current Time {{ $phpTime }}
Server date() {{ $serverTime }}

⚡ Laravel / Carbon

config('app.timezone') {{ $laravelTimezone }}
Carbon::now() {{ $carbonNow->format('Y-m-d H:i:s T') }}
Carbon::now('UTC') {{ $carbonUtc->format('Y-m-d H:i:s T') }}
Carbon::now('Asia/Kolkata') {{ $carbonIst->format('Y-m-d H:i:s T') }}

🗄️ MySQL Database

Global Timezone (@@global.time_zone) {{ $mysqlTime->global_tz }}
Session Timezone (@@session.time_zone) {{ $mysqlTime->session_tz }}
MySQL NOW() {{ $mysqlTime->now }}
@php $laravelOk = $laravelTimezone == 'Asia/Kolkata'; $mysqlOk = $mysqlTime->session_tz == '+05:30' || $mysqlTime->session_tz == 'Asia/Kolkata'; @endphp

{{ $laravelOk && $mysqlOk ? '✅ All Good!' : '⚠️ Fixes Required' }}

@if(!$laravelOk)

1. Laravel Timezone: Update config/app.php

// config/app.php
'timezone' => 'Asia/Kolkata',
@endif @if(!$mysqlOk)

2. MySQL Session Timezone: Add to config/database.php

// config/database.php -> mysql connection
'mysql' => [
    ...
    'timezone' => '+05:30',
],

Then clear cache:

php artisan config:clear
php artisan cache:clear
@endif @if($laravelOk && $mysqlOk)

Your timezone configuration is correct! Both Laravel and MySQL are set to IST (+05:30).

@endif

📝 Quick Summary

Laravel app.timezone {{ $laravelOk ? '✅' : '❌' }} {{ $laravelTimezone }}
MySQL Session TZ {{ $mysqlOk ? '✅' : '❌' }} {{ $mysqlTime->session_tz }}
PHP Timezone {{ $phpTimezone == 'Asia/Kolkata' ? '✅' : '⚠️' }} {{ $phpTimezone }}