Thursday, August 27, 2026

The Missing Tenant Setting: How to Set Mailbox Time Zones in Bulk for M365

If you've ever provisioned a brand-new Microsoft 365 tenant or created a batch of new user mailboxes, you might have noticed something strange in Outlook on the Web or the new Outlook desktop client: email timestamps and calendar entries are off by 4 or 5 hours.

By default, newly provisioned Exchange Online mailboxes inherit an unconfigured or UTC (Coordinated Universal Time) state. Because Microsoft treats regional settings as an individual mailbox attribute rather than a global tenant policy, there is no master switch in the admin portal to set a default time zone across the organization.

Why does this matter?

While legacy "Classic" Outlook desktop apps often read the local PC clock, Outlook on the Web (OWA), New Outlook for Windows/Mac, Out-of-Office auto-replies, and Calendar scheduling assistants strictly evaluate against the server-side mailbox time zone.


Method 1: Batch-Fix All Mailboxes via PowerShell (Recommended)

The Exchange Admin Center (EAC) web GUI lacks regional configuration settings. Using the Exchange Online PowerShell module is the fastest way to align every user, shared mailbox, and resource at once.

Step 1: Connect to Exchange Online

Connect-ExchangeOnline

Step 2: Apply Time Zone & Language Across the Tenant

For All Standard User Mailboxes:

Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox | Set-MailboxRegionalConfiguration -TimeZone "Eastern Standard Time" -Language "en-US"

For Shared Mailboxes & Room Resources:

Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails SharedMailbox,RoomMailbox | Set-MailboxRegionalConfiguration -TimeZone "Eastern Standard Time" -Language "en-US"

For a Single Specific User:

Set-MailboxRegionalConfiguration -Identity "user@yourdomain.com" -TimeZone "Eastern Standard Time" -Language "en-US"

Step 3: Verify the Changes

Get-MailboxRegionalConfiguration -Identity "user@yourdomain.com" | Select-Object Identity, TimeZone, Language, DateFormat, TimeFormat

Method 2: Manual End-User Setup via Outlook Web App (OWA)

If an end user needs to adjust their own time zone manually without administrator intervention:

  1. Log into Outlook on the Web.
  2. Click the Gear icon (Settings) located in the top-right header bar.
  3. Navigate to General > Language and time.
  4. Under Time zone, select your local region (e.g., (UTC-05:00) Eastern Time (US & Canada)).
  5. Click Save.

Supported Microsoft TimeZone IDs Reference

Exchange Online requires specific string identifiers for the -TimeZone parameter. Even though these identifier strings contain the word "Standard Time", Exchange automatically adjusts for Daylight Saving Time dynamically.

To list all valid system time zone IDs directly inside your active PowerShell session:

[System.TimeZoneInfo]::GetSystemTimeZones() | Select-Object Id, DisplayName | Format-Table -AutoSize

Common US & North American Time Zones

Time Zone PowerShell -TimeZone Value Standard UTC Offset
Eastern Time "Eastern Standard Time" UTC-05:00
Central Time "Central Standard Time" UTC-06:00
Mountain Time "Mountain Standard Time" UTC-07:00
Mountain (Arizona / No DST) "US Mountain Standard Time" UTC-07:00
Pacific Time "Pacific Standard Time" UTC-08:00
Alaska "Alaskan Standard Time" UTC-09:00
Hawaii "Hawaiian Standard Time" UTC-10:00
Atlantic (Canada) "Atlantic Standard Time" UTC-04:00
Newfoundland "Newfoundland Standard Time" UTC-03:30

Common International Time Zones

Region / Hub PowerShell -TimeZone Value Standard UTC Offset
UTC Default "UTC" UTC+00:00
London / GMT "GMT Standard Time" UTC+00:00
Western Europe (Paris, Berlin) "W. Europe Standard Time" UTC+01:00
Eastern Europe (Athens, Kyiv) "FLE Standard Time" UTC+02:00
Dubai / UAE "Arabian Standard Time" UTC+04:00
India "India Standard Time" UTC+05:30
Singapore / Beijing "Singapore Standard Time" UTC+08:00
Tokyo "Tokyo Standard Time" UTC+09:00
Sydney / Melbourne "AUS Eastern Standard Time" UTC+10:00
Auckland / New Zealand "New Zealand Standard Time" UTC+12:00

MSP Best Practice: Automate Tenant Onboarding

Since Microsoft 365 does not automatically inherit a tenant-wide default time zone for future accounts, make it a standard SOP to append the Set-MailboxRegionalConfiguration command directly into your new-hire or new-tenant provisioning scripts to avoid post-deployment support tickets.

GGcac119f3f2508aa3

Thursday, August 20, 2026

WordPress - Fixing the WP Activity (plugin) Log Fatal TypeError on PHP 8.x (class-wp-helper.php)

Fixing the WP Activity Log Fatal TypeError on PHP 8.x (class-wp-helper.php)

If you recently upgraded your WordPress environment to PHP 8.0, 8.2, or 8.3 and noticed a "There has been a critical error on this website" screen when loading the WP Activity Log viewer (/wp-admin/admin.php?page=wsal-auditlog), you are likely running into an unhandled scalar type mismatch in modern PHP runtimes.

Tracked on the WordPress Support Forums: Fatal error 5.6.5 with WP 7.1: strtolower receives integer callback id (View Forum Hotfix Reply)


The Error Breakdown

Checking the site's debug.log file reveals a fatal TypeError originating from the plugin's notice-suppression helper:

[20-Aug-2026 05:28:54 UTC] PHP Fatal error: Uncaught TypeError: strtolower(): Argument #1 ($string) must be of type string, int given in /var/www/html/wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php:656
Stack trace:
#0 /var/www/html/wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php(656): strtolower(1243)
#1 /var/www/html/wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php(537): WSAL\Helpers\WP_Helper::remove_unrelated_actions('admin_notices')
#2 /var/www/html/wp-includes/class-wp-hook.php(353): WSAL\Helpers\WP_Helper::hide_unrelated_notices('')
#3 /var/www/html/wp-includes/class-wp-hook.php(377): WP_Hook->apply_filters(NULL, Array)
#4 /var/www/html/wp-includes/plugin.php(523): WP_Hook->do_action(Array)
#5 /var/www/html/wp-admin/admin-header.php(151): do_action('admin_print_scr...')
#6 /var/www/html/wp-admin/admin.php(244): require_once('/var/www/html/w...')
#7 {main}
  thrown in /var/www/html/wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php on line 656

Why It Happens

To keep the activity log viewer interface clean, the plugin executes hide_unrelated_notices() on the admin_notices action hook. It scans registered callback functions and runs strtolower() against each callback identifier to determine whether the notice belongs to WP Activity Log or another plugin.

In PHP 7.x, passing non-string values (such as integer identifiers generated by dynamic hooks, anonymous functions, or closures) into strtolower() resulted in silent typecasting. In PHP 8.0+, scalar type checking is strictly enforced: passing an integer like 1242 or 1243 throws an uncaught TypeError and immediately crashes script execution.


The Workaround / Hotfix

Until an upstream update is released by the plugin developers, you can apply a one-line hotfix to cast the callback parameter explicitly to a string before evaluation.

Manual File Edit

Open /wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php and navigate to line 656:

// Original line:
strtolower( $callback )

// Updated line:
strtolower( (string) $callback )

Quick Docker / Shell Command

If you manage your WordPress instance in Docker or have SSH terminal access, you can run a non-destructive in-place sed substitution:

# Inside a standard Linux server / webroot:
sed -i 's/strtolower(\([^)]*\))/strtolower((string)\1)/g' wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php

# Or directly inside a running Docker container:
docker exec -it your-wordpress-container sed -i 's/strtolower(\([^)]*\))/strtolower((string)\1)/g' /var/www/html/wp-content/plugins/wp-security-audit-log/classes/Helpers/class-wp-helper.php

Once applied, refresh the WP Activity Log page in your admin dashboard. The activity audit log table will render immediately without triggering fatal errors.

Follow the community thread or submit further feedback on the official WordPress Support Forum topic.

GG-c1c4d41df18c3c5c