- Compatible XF 2.x versions
- 2.3
- Additional requirements
- XenForo 2.3.13 or newer. Tested with 2.3.13. No additional dependencies.
- License
- CC0 1.0 Universal
- Visible branding
- No
Correct day names for your timestamps
XQ Timestamp Fix is a lightweight workaround for a long-standing XenForo bug that can display an incorrect day name when the visitor’s browser time zone differs from the time zone XenForo uses to display dates.
The issue was reported in January 2021 and again in November 2022. It remains reproducible in XenForo 2.3.13, more than five years after the original report:
What goes wrong?
XenForo initially produces the correct date and time through PHP. Its JavaScript date updater can then calculate the day name using the browser’s time zone while keeping the clock time formatted for the guest or member’s display time zone.
The result combines parts of two different local dates into one misleading timestamp.
For example, the same post could appear as:
When viewed on Tuesday afternoon, “Yesterday at 12:14 AM” means early Monday morning in Mountain time. The equivalent Pacific time is late Sunday night, not Monday night.
Even a one-hour time zone difference can therefore produce a whole-day error in the displayed day name. In this example, the incorrect guest label makes the post appear to have been made 24 hours later than its correct Pacific date and time.
At extreme time zone offsets on opposite sides of the International Date Line, the calendar dates can differ by two days, allowing an apparent discrepancy of up to 48 hours in the day-and-time label.
The stored timestamp is not changed. The full date shown in the hover tooltip remains correct. This is a display bug, but it can make the timing and order of conversations confusing.
Who can encounter it?
Different time zones do not always cause an error. The problem appears when those zones place the post on different calendar dates and XenForo displays a named day such as Sunday or Monday.
What this add-on does
XQ Timestamp Fix preserves the correct day-name timestamps produced by XenForo’s PHP renderer and prevents JavaScript from overwriting them.
It targets XenForo’s named-day range, normally posts from two through six calendar days ago. All seven day names are covered, including Saturday and Sunday.
Important limitation
This is a focused PHP workaround. Protected day-name labels remain static until the page is freshly rendered.
It does not repair XenForo’s separate live-update behavior when a tab stays open across midnight. A timestamp outside the protected range when the page loads can still encounter that issue later. Refreshing the page and receiving a fresh server-generated response recalculates the labels correctly.
Browser Back/Forward restoration and cached pages can retain older labels. Custom date displays that bypass XenForo’s standard renderer are outside this add-on’s scope.
Installation
There are no settings to configure. Use XenForo’s standard add-on controls to disable or uninstall it.
Compatibility
Requires XenForo 2.3.13 or newer. Version 1.0.0 was tested against XenForo 2.3.13, including extensive time zone simulations, daylight-saving boundaries, translated labels, and both the original and minified JavaScript date updater.
Review compatibility after XenForo upgrades. If XenForo fixes the underlying issue, this workaround can be disabled or uninstalled.
XQ Timestamp Fix is a lightweight workaround for a long-standing XenForo bug that can display an incorrect day name when the visitor’s browser time zone differs from the time zone XenForo uses to display dates.
The issue was reported in January 2021 and again in November 2022. It remains reproducible in XenForo 2.3.13, more than five years after the original report:
- January 2021: Sometimes the day of week displays incorrectly for timezone settings
- November 2022: <xf:date> displays day in browser timezone not forum/account timezone
What goes wrong?
XenForo initially produces the correct date and time through PHP. Its JavaScript date updater can then calculate the day name using the browser’s time zone while keeping the clock time formatted for the guest or member’s display time zone.
The result combines parts of two different local dates into one misleading timestamp.
For example, the same post could appear as:
- Logged-in member using Mountain time: Yesterday at 12:14 AM.
- Guest using the forum’s Pacific time setting: Monday at 11:14 PM.
- Correct guest timestamp: Sunday at 11:14 PM.
When viewed on Tuesday afternoon, “Yesterday at 12:14 AM” means early Monday morning in Mountain time. The equivalent Pacific time is late Sunday night, not Monday night.
Even a one-hour time zone difference can therefore produce a whole-day error in the displayed day name. In this example, the incorrect guest label makes the post appear to have been made 24 hours later than its correct Pacific date and time.
At extreme time zone offsets on opposite sides of the International Date Line, the calendar dates can differ by two days, allowing an apparent discrepancy of up to 48 hours in the day-and-time label.
The stored timestamp is not changed. The full date shown in the hover tooltip remains correct. This is a display bug, but it can make the timing and order of conversations confusing.
Who can encounter it?
- Guests whose browser time zone differs from the configured Guests’ time zone.
- Registered members whose browser time zone differs from their account’s selected time zone.
Different time zones do not always cause an error. The problem appears when those zones place the post on different calendar dates and XenForo displays a named day such as Sunday or Monday.
What this add-on does
XQ Timestamp Fix preserves the correct day-name timestamps produced by XenForo’s PHP renderer and prevents JavaScript from overwriting them.
It targets XenForo’s named-day range, normally posts from two through six calendar days ago. All seven day names are covered, including Saturday and Sunday.
- Works for guests and registered members.
- Uses XenForo’s existing time zone and calendar calculations.
- Preserves the timestamp’s visible text, full-date tooltip, styling, and machine-readable date.
- Leaves other timestamp ranges under XenForo’s normal live-update behavior.
- Requires no configuration.
- Adds no JavaScript, template modifications, external dependencies, scheduled tasks, or custom database tables.
- Makes no changes to stored timestamps or user time zone settings.
- Includes file-health hashes.
Important limitation
This is a focused PHP workaround. Protected day-name labels remain static until the page is freshly rendered.
It does not repair XenForo’s separate live-update behavior when a tab stays open across midnight. A timestamp outside the protected range when the page loads can still encounter that issue later. Refreshing the page and receiving a fresh server-generated response recalculates the labels correctly.
Browser Back/Forward restoration and cached pages can retain older labels. Custom date displays that bypass XenForo’s standard renderer are outside this add-on’s scope.
Installation
- Install the ZIP through Admin CP → Add-ons → Install/upgrade from archive, or upload its contents and install normally.
- Run File health check.
- Refresh an affected page.
There are no settings to configure. Use XenForo’s standard add-on controls to disable or uninstall it.
Compatibility
Requires XenForo 2.3.13 or newer. Version 1.0.0 was tested against XenForo 2.3.13, including extensive time zone simulations, daylight-saving boundaries, translated labels, and both the original and minified JavaScript date updater.
Review compatibility after XenForo upgrades. If XenForo fixes the underlying issue, this workaround can be disabled or uninstalled.