# How to set date & time for multiple posts having the same post date?

**URL:** <https://talk.jekyllrb.com/t/how-to-set-date-time-for-multiple-posts-having-the-same-post-date/9354>\
**Category:** Help\
**Created:** [August 1, 2024, 10:55am UTC](https://talk.jekyllrb.com/t/how-to-set-date-time-for-multiple-posts-having-the-same-post-date/9354 "2024-08-01T10:55:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anupdsouza](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/anupdsouza/32/6028_2.png) [@anupdsouza](https://talk.jekyllrb.com/u/anupdsouza)\
**Post date:** [August 1, 2024, 10:55am UTC](https://talk.jekyllrb.com/t/how-to-set-date-time-for-multiple-posts-having-the-same-post-date/9354/1 "2024-08-01T10:55:16Z")

</div>

I have the following front matter for my blog posts created using Jekyll and using the minimal mistakes theme:

* * *

## layout: single title: “” excerpt: “” seo\_title: “” seo\_description: “” categories:

## tags:

- 

* * *

Is there a way to specify the time for posts? If I have multiple posts with file names such as 2024-08-01-article-1.md published first & 2024-08-01-article-2.md published later how can I make it such that article-2 appears at the top of the blog? What’s happening right now is that 2 articles with the same yyyy-mm-dd date are displaying in descending order of publishing instead of ascending.

---

<div class="post-metadata">

**Author:** ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)\
**Post date:** [August 1, 2024, 1:11pm UTC](https://talk.jekyllrb.com/t/how-to-set-date-time-for-multiple-posts-having-the-same-post-date/9354/2 "2024-08-01T13:11:21Z")

</div>

By default, Jekyll uses the date you use in the filename, just as you suggested, so `2024-08-01-article-2.md` is read by Jekyll, and then when it displays the posts, it uses that date.

However, your post should also have a `date` field in the YAML front matter. You will find that when you create a new blank Jekyll site, it includes that field. This is a best practice, especially for people like you who may post more than once a day and care about how the file gets displayed.

Using the date field, you can use this format:  
`date: 2024-08-01`

In your case, that does not help a lot because you want more granularity, so you can extend the date format like this, which includes HH:MM;SS  
`date: 2024-08-01 02:05:54`

Technically, Jekyll uses ISO8601, which means you can extend the date to the UTC timezone offset. For example, I live in California, which is -7 hours from UTC, so I represent the date like this:  
`date: 2024-07-31 19:05:54 -0700`

Here is what you should minimally do so you get the sorting right, assuming article 1 was written first and article 2 was written second:

`2024-08-01-article-1.md`:

```auto
---
layout: single
title: article-1
date: 2024-08-01 02:01:00
excerpt:
seo_title:
seo_description:
categories:
tags:
---
The content goes here...

```

`2024-08-01-article-2.md`:

```auto
---
layout: single
title: article-2
date: 2024-08-01 02:02:00
excerpt:
seo_title:
seo_description:
categories:
tags:
---
The content goes here...

```

---

<div class="post-metadata">

**Author:** ![anupdsouza](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/anupdsouza/32/6028_2.png) [@anupdsouza](https://talk.jekyllrb.com/u/anupdsouza)\
**Post date:** [August 2, 2024, 4:07am UTC](https://talk.jekyllrb.com/t/how-to-set-date-time-for-multiple-posts-having-the-same-post-date/9354/3 "2024-08-02T04:07:12Z")

</div>

Thank you so much, it worked like a charm!

---

<div class="post-metadata">

**Author:** ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)\
**Post date:** [August 5, 2024, 5:09pm UTC](https://talk.jekyllrb.com/t/how-to-set-date-time-for-multiple-posts-having-the-same-post-date/9354/4 "2024-08-05T17:09:16Z")

</div>

Great! I’m glad this worked out for you!
