I wanted to add timezone support to my blog app but got stuck with a design problem.

Every post has a published_on field which stores the publication date in a timezone aware format (UTC converted to user's timezone). So far so good. But the permalink of a post is created from the publication date as well. It has the format: /year/month/day/slug.

This of course is not timezone aware and must be the same for all users around the world. So I have to define a timezone to use for the permalink. There are three options which make sense:

  • The author's timezone
  • UTC
  • The default timezone of the server.

Which would be the most appropriate?

  • After some thought, the author's timezone drops out. It would be much more complicated to filter entries that all use a different timezone.
    – sbaechler
    Commented Aug 21, 2012 at 12:33

2 Answers 2


I'd go with UTC. It has several advantages:

  1. It's universal and doesn't change with daylight saving time.
  2. It won't change if your server changes timezone.
  3. It won't change if authors change timezone.
  4. There are standard conversions between UTC and local time zones.

Despite the problems it sometimes causes (confusion over the "day") it can be explained and is consistent.

  • The killer argument here is number 2. URLs might change if the server changes timezone. Number 1 and 3 are not really an issue since the timezone information is stored in the date as well.
    – sbaechler
    Commented Aug 21, 2012 at 12:35

We had the same problem in our project and we persisted all the time in database as UTC.

The UTC time is converted to local timezone of the user when accessing / reading the data. This simplified our entire design.

  • The date is already stored as UTC in the database. This question is about the permalink only.
    – sbaechler
    Commented Aug 21, 2012 at 7:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.