# Jekyll-compose, automatically add time

**URL:** <https://talk.jekyllrb.com/t/jekyll-compose-automatically-add-time/667>\
**Category:** Help\
**Created:** [June 16, 2017, 11:30am UTC](https://talk.jekyllrb.com/t/jekyll-compose-automatically-add-time/667 "2017-06-16T11:30:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff123](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jeff123](https://talk.jekyllrb.com/u/jeff123)\
**Post date:** [June 16, 2017, 11:30am UTC](https://talk.jekyllrb.com/t/jekyll-compose-automatically-add-time/667/1 "2017-06-16T11:30:55Z")

</div>

I use a default theme and **jekyll-compose**. I somehow figured out how to manually add time to a date format. I would like to know how to add it automatically by jekyll-compose. Currently when I hit `bundle exec jekyll post "My new post"`, it adds time 00:00 to a post. The same when I publish a draft.  
 ![](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/1X/f825930377033f1c379b154f903223b38eaa5fd9.png) ![](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/1X/0ea9f258eabda8f5264ac7c52238f6e6988232da.png)

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [June 16, 2017, 8:30pm UTC](https://talk.jekyllrb.com/t/jekyll-compose-automatically-add-time/667/2 "2017-06-16T20:30:11Z")

</div>

I’m guessing what is happening here is the theme is using datetime from the filename, which will only get you the month, day, and year (eg. YYYY-MM-DD).

If you want hours and minutes you’ll need to add something like this to your post’s YAML Front matter.

```auto
date: 2017-06-16T16:28:40-04:100  

```

I’ve never used **jekyll-compose** so no idea if it can do that when it creates the post. But without it the theme will just fallback to `00:00` since it has no clue what the hour or minutes are on the date.

---

<div class="post-metadata">

**Author:** ![jeff123](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jeff123](https://talk.jekyllrb.com/u/jeff123)\
**Post date:** [June 17, 2017, 8:16am UTC](https://talk.jekyllrb.com/t/jekyll-compose-automatically-add-time/667/3 "2017-06-17T08:16:23Z")

</div>

I rewrote it at one place (see screenshot). Also see [date formatting](https://learn.cloudcannon.com/jekyll/date-formatting/). It is only inside articles, but maybe I would be able to find where to rewrite it to change frontpage as well. To assign the time automatically I suspect that I would have to rewrite the code of **jekyll-compose**. I don’t know. I wanted to contact an author of the theme but he is only[available through](https://github.com/jglovier/jekyll-new) Twitter and I don’t have Twitter.

 ![](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/1X/bc19f4b9fd66e1ccbcc39a31679fc21b2f63af75.png) ![](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/1X/ccfb70995ab574f5fde2a6e8df2d6198a872498c.png)
