When you run a message trace operation to get status information about specific emails, the result can vary, depending on time zone settings. See a sample here.
Show messages in the mail client
In this sample, we work with an email sent from azure-noreply@microsoft.com. In Outlook we see the timestamp at Mon 7/5/2021 7:08 PM (2021-07-05 19:08).
Message Trace in Delegate365
In Delegate365, admins can run a message trace to get information about the delivery status. When we run the message trace with the filter Startdate 2021-07-05 to Enddate 2021-07-05 - just this one day - and that user as recipient...
...we do not get a result. The Message trace result shows an empty list.
Why is that? Let´s check.
Message Trace with PowerShell
When we check with Remote Exchange PowerShell (you can also preferably use the EXO V2 module) and the Get-MessageTrace cmdlet, and an extended time frame from one day before (2021-07-04) to to one day after (2021-07-06) as here...
$session = New-PSSession -ConfigurationName Microsoft.Exchange `
-ConnectionUri https://outlook.office365.com/powershell-liveid/ `
-Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $session -AllowClobber
Get-MessageTrace -StartDate '07/04/2021 0:00AM' -EndDate '07/06/2021 11:59PM' `
-RecipientAddress 'admin@tenant.onmicrosoft.com'
...we get two results. The second result from azure-noreply@microsoft.com is the one message we are interested in.
Received Sender Address Recipient Address Subject Status
-------- -------------- ----------------- ------- ------
06.07.2021 20:33:18 ProjectAlpha@M365x398760.onmicrosoft.com admin@tenant.onmicrosoft.com You've joined the Project Alpha group Delivered
06.07.2021 02:08:34 azure-noreply@microsoft.com admin@tenant.onmicrosoft.com Azure AD Identity Protection Weekly Digest Delivered
We see, that the one message is not from 2021-07-05 19:08 as shown in Outlook, but from 2021-07-06 02:08. The time difference between the two dates is 7 hours. Let´s search for the reason.
Get the tenant information
As a Global Admin, we can check the location of the Exchange Online servers in the Microsoft 365 admin center - Org settings.
So, the Exchange Server is located in the European Union, which means Central European Time (CET) which is UTC/GMT+1.
Check the mailbox time zone
The Delegate365 message trace did not return the same result. When we check the user´s mailbox with Get-Mailboxregionalconfiguration, we see that the mailbox settings are in a different time zone (in Pacific Standard Time, which means UTC−08:00) than the Exchange server (in Central Europe Time):
Get-Mailboxregionalconfiguration -Identity 'admin@tenant.onmicrosoft.com'
Identity Language DateFormat TimeFormat TimeZone
-------- -------- ---------- ---------- --------
admin en-US M/d/yyyy h:mm tt Pacific Standard Time
# To get all available time zones, we can run
Get-TimeZone -ListAvailable
The mail was delivered at 06.07.2021 02:08:34 CET, but the mailbox shows one day earlier, 2021-07-05 19:08 PST, which results in a time difference of -7 hours on the previous another day.
This is the reason, why different dates are shown, and why the message trace with the filter for one full day (2021-07-05) did not deliver that email(s).
Solution: Extend the date range in Delegate365 Message Trace
So, we add one day to the message trace filter in Delegate365. The Startdate goes from 2021-07-05 to Enddate 2021-07-06. Delegate365 always is using the full day, so in this sample, this covers 2 days.
We now get the two messages, including our sample email.
The time here differs because of the time zones of the mailbox, the Exchange server and the client. Between the local client time (CET: UTC+1) and the mailbox time zone (PST: UTC-8), there are 9 hours difference. The email that was delivered for the user on 2021-07-05 19:08 plus 9 hours makes 2021-07-06 04:08. This is the result that is shown in Delegate365.
Summary
To ensure, to get all messages of a specific time range with message trace, add or substract one day, depending on varying time zones of the Exchange server location and the user´s mailbox, as in this sample. Check the configuration to know about such possible settings.
Also, admins can set the Exchange server time zone as described at Configure the time zone in Exchange Online, and modify the mailbox time zone with Set-MailboxRegionalConfiguration.
I hope this sample helps to clarify and to avoid unexpected results in the message trace functions.