A sitemap can include a date next to the address of a page. In two local builds of our site, that date changed even though the page itself came out byte-for-byte identical. We changed the source file's modification time in an exported copy and followed what the build did with it. The result gives us a concrete reason to ask where a date comes from before using it to decide whether a page changed.

Find the source of the date

The build consults several sources for a top-level HTML page. In the revision we examined, it first looks in the source text for a date field in a particular format. It then looks for a recognizable last-updated stamp it can parse. If it finds neither, it tries to get the commit date associated with the latest Git log entry for that file. If that lookup cannot supply a date, it uses the file's modification time and takes the UTC calendar day. This is the order in the code. We did not test every pair of possible date sources or every date format.

We first built from a versioned checkout. The selected Company page had neither of the two recognized date patterns. Its sitemap entry reported November 20, 2026, the date returned by the file-specific Git lookup in that checkout. All nine baseline site tests passed locally. We used that baseline to confirm the build and its ordinary tests were working before comparing outputs. The date comparison below came from separate builds that varied the available input.

Change the timestamp and compare the page

We exported the same revision into a directory without Git history. For one build we set the Company source file's modification time to noon UTC on February 3, 2024. For the other we set it to noon UTC on March 4, 2025. These were synthetic dates. Both builds completed. The sitemap entry for the Company page used the corresponding day in each output. We then compared the two generated Company HTML files directly. They matched byte for byte. The changed date therefore identifies a difference in the generated sitemap even though the tested page bytes did not change.

The archive comparison holds the page source constant. It changes an input that can sit outside the source text, the timestamp of the file that contains it. Someone comparing the two generated sitemaps would see a different date for the same address. Someone comparing the two Company pages would see the same bytes. The comparison covers one page and does not establish that every other build output matched.

Compare a declared date and a generated article

In another local build we added two date patterns to the Company source. The date field named June 7, 2023, and the last-updated stamp named May 5, 2022. We kept the later file modification time from the previous build. The sitemap used June 7, 2023. That observation establishes which value won in this fixture. It leaves the stamp-only case open. The experiment also makes clear that a supplied date can be tested for precedence without establishing whether it accurately represents when anybody edited the page.

An Engineering article gave us a control. Its sitemap date stayed December 4, 2026, in the versioned build and both timestamp trials. The generator takes that entry's date from the article's editorial metadata. The Company page result and the article result can sit side by side in the same generated file even though those entries have different sources. Looking at the dates alone would leave that distinction invisible.

Keep the hosted observation separate

In a separate read-only sample, production reported the same website revision we tested locally. Its sitemap listed December 4 for both the Company page and the selected article. That Company date differed from the date in our local checkout build. We did not verify which source provided the hosted date or compare the hosted page bytes with the local copies. Nor did we measure what a search crawler did with any of the dates.

The local tests answer a narrower question. For this page in an exported copy, changing the source timestamp was enough to move the generated sitemap date. A comparison of that date can tell us something in the sitemap changed. Establishing a change to the page itself requires a comparison of the page.

← All engineering articles