Skip to content

How to set time zone? #767

@georgek

Description

@georgek

I've been having a strange problem with my blog publishing pipeline and I've narrowed it down to how time zones are being handled.

Org-mode itself does not support time zones, so everything is in local time. I'm in Europe/London so for half the year I'm in GMT (UTC) and the other in BST (UTC+1). When in BST my posts weren't getting published because they look like they're from the future and Hugo, by default, doesn't publish posts from the future.

On my local machine the org-mode timestamps are correctly exported with time zone information, e.g. [2025-07-31 Thu 09:41] becomes 2025-07-31T09:41:00+01:00 in the Markdown. But on a CI machine they are coming out as 2025-07-31T09:41:00+00:00 which is incorrect (it's an hour ahead).

Things I've tried:

  1. Setting (setenv "TZ" "Europe/London") (no effect),
  2. (set-time-zone-rule "Europe/London") (no effect),
  3. Using timedatectl set-timezone (no effect).

I'm out of ideas. Is there some other way to force the time zone?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions