Timezone Configuration
Configure timezone settings for correct time display
Astervis uses three timezone layers. All must be configured correctly for accurate time display.
Timezone Layers
| Layer | Variable | Purpose |
|---|---|---|
| Database | — | Always UTC (automatic) |
| PBX Source | MYSQL_TIMEZONE | Your Asterisk server timezone |
| Display | TIMEZONE, NEXT_PUBLIC_TIMEZONE | How times are shown to users |
How It Works
- Asterisk writes CDR with its local time (e.g.,
Europe/Moscow) - Sync converts to UTC using
MYSQL_TIMEZONE - Database stores everything in UTC
- Dashboard displays in
TIMEZONE
If MYSQL_TIMEZONE doesn't match your PBX server's actual timezone, all call times will be wrong.
Configuration
Edit /opt/astervis/.env:
Common Timezones
| Region | Timezone |
|---|---|
| Moscow | Europe/Moscow |
| Tashkent | Asia/Tashkent |
| Almaty | Asia/Almaty |
| Kyiv | Europe/Kyiv |
| Minsk | Europe/Minsk |
| London | Europe/London |
| New York | America/New_York |
| Los Angeles | America/Los_Angeles |
Full list: Wikipedia Timezone List
Finding Your PBX Timezone
On FreePBX/Sangoma
Check MySQL Timezone
If MySQL shows SYSTEM, it uses the server's OS timezone.
Applying Changes
After changing timezone settings:
Existing data in the database is already in UTC. Timezone changes only affect how times are displayed, not stored data.
Troubleshooting
Calls Show Wrong Time
Symptom: Calls appear several hours off from actual time.
Cause: MYSQL_TIMEZONE doesn't match PBX timezone.
Fix:
- Check PBX timezone:
timedatectl - Update
.env:MYSQL_TIMEZONE=Your/Timezone - Restart services
Different Users See Different Times
Symptom: Some users see correct time, others don't.
Cause: Browser timezone differs from configured display timezone.
Note: Astervis uses server-configured timezone, not browser timezone. All users see the same time.
DST (Daylight Saving Time) Issues
Symptom: Times are off by 1 hour after DST change.
Cause: Timezone configured as fixed offset (e.g., +03:00) instead of named timezone.
Fix: Use named timezones (e.g., Europe/Moscow) which handle DST automatically:
Historical Data Has Wrong Times
Symptom: Old calls show wrong times, new calls are correct.
Cause: MYSQL_TIMEZONE was wrong during initial sync.
Fix: You need to re-sync historical data:
This will re-import all CDR data. For large databases, use --start-date to limit scope.
Best Practices
- Use named timezones — not UTC offsets
- Keep all three settings consistent —
MYSQL_TIMEZONE,TIMEZONE,NEXT_PUBLIC_TIMEZONE - Match PBX timezone exactly — critical for correct sync conversion
- Don't change timezone after initial setup — existing data won't be converted