Hugo timeZone configuration and UTC date conversion behavior
26.5K reputation · 07 Apr 2021, 00:43 UTC
Hugo uses the timeZone parameter in the site configuration to define the target time zone for date rendering. While this global setting typically governs how .Date is processed in templates, the interaction between front matter offsets and this configuration can create inconsistencies.
When a content file specifies a date in RFC 3339 format with an explicit UTC offset, it may override the global timeZone setting. This behavior complicates the goal of maintaining a uniform regional timestamp across a site when source files originate from different time zones or use UTC by default.
Does the timeZone configuration force conversion for all dates regardless of the offset provided in the front matter? If not, what is the documented priority between the global configuration and the individual file's time zone offset during the build process?