Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Generated permalinks depend on system time zone: add configuration setting #850

stomar opened this Issue · 13 comments

4 participants

Marcus Stollsteimer Parker Moore Zach Matt Rogers
Marcus Stollsteimer

On collaborative projects, like e.g., a Jekyll site might be generated by various contributors in different time zones.

In this situation, generated permalinks can alternate between two consecutive days, since the local time zone is used to determine the day of the post date.

The only current solution seems to be calling Jekyll with e.g.

$ TZ=GMT jekyll [options]

I rather would like to have a setting in the _config.yml file. (To prevent the time zone not being set correctly by accident.)

Parker Moore

What would your setting look like and what would the acceptable values be? Just "GMT", "UTC", etc, or would "+1100", and "-05:00" work as well? Are you working on a PR? Definitely a good idea.

Marcus Stollsteimer


Any possibility would be fine, e.g. a timezone setting to override the system timezone.

I know nothing about Jekyll internals so I'm currently not working on a pull request.

Marcus Stollsteimer

It seems issue #492 is related to this one.

Parker Moore

I'd have a timezone setting which would default to the system timezone if not set explicitly. This timezone setting would be used everywhere any times are handled.

Parker Moore

Looks like the tzinfo gem would be a great fit for this.

Marcus Stollsteimer

To clarify the expected behavior:

Let's assume a post has a date set in the YAML front matter:

date: 2013-03-10 23:05:00 UTC

Current behavior when generating permalinks:

  • when the site is generated at +0000: .../2013/03/10/...
  • when the site is generated at +0100: .../2013/03/11/...

since 2013-03-10 23:05:00 UTC is the same as 2013-03-11 00:05:00 +0100 and the day is taken from the representation of the time in the local time zone.

Expected behavior for timezone = "UTC":

  • independent of the location: ../2013/03/10/.. (day based on the UTC time)

Furthermore, for a date

date: 2013-03-10 6:00:00 +0900

the permalink with timezone = "UTC" should be ../2013/03/09/... (2013-03-09 21:00:00 UTC).

Marcus Stollsteimer

Personally, I only care about UTC, so even using date.getutc.strftime(...) would do the trick.

Marcus Stollsteimer

I'm not sure about the tzinfo gem, since it seems to actually change the time: if I understand correctly, the returned "local" times are marked as UTC.

That would probably be no issue for generating permalinks, but might be problematic when the full time information (including time zone) is used.

(But I didn't have much time to look into this so I'm not sure.)

Marcus Stollsteimer stomar referenced this issue in ruby/

Generated permalinks depend on system time zone #58


@parkr sorry for all the questions but is this also required for v1.0? Would be glad to put this on my list next.

Matt Rogers

It's in the 1.0 milestone, so we'd like to include it with that release.


@mattr- thanks, I will start taking a look at this tonight.

Parker Moore

My PR #957 does this the easy way.

Parker Moore

Closed with merge of #957.

Parker Moore parkr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.