# What format does --date expect?

**URL:** <https://discourse.pijul.org/t/what-format-does-date-expect/483>\
**Category:** Question\
**Created:** [May 1, 2020, 6:54pm UTC](https://discourse.pijul.org/t/what-format-does-date-expect/483 "2020-05-01T18:54:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tae](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/tae/32/81_2.png) [@tae](https://discourse.pijul.org/u/tae)\
**Post date:** [May 1, 2020, 6:54pm UTC](https://discourse.pijul.org/t/what-format-does-date-expect/483/1 "2020-05-01T18:54:10Z")

</div>

`pijul help record` says that I can pass a custom date with `--date`. I’ve tried with variations of the date shown by `pijul log` (e.g. `2020-03-01 12:21:31`), but I always get `error: Invalid date`. What format should I use?

---

<div class="post-metadata">

**Author:** ![lthms](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/lthms/32/124_2.png) [@lthms](https://discourse.pijul.org/u/lthms)\
**Post date:** [May 1, 2020, 9:20pm UTC](https://discourse.pijul.org/t/what-format-does-date-expect/483/2 "2020-05-01T21:20:34Z")

</div>

Have a look at the date format of `pijul log`; if I recall correctly, you need to use the same.

---

<div class="post-metadata">

**Author:** ![tae](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/tae/32/81_2.png) [@tae](https://discourse.pijul.org/u/tae)\
**Post date:** [May 2, 2020, 1:26pm UTC](https://discourse.pijul.org/t/what-format-does-date-expect/483/3 "2020-05-02T13:26:09Z")

</div>

That’s what I tried without luck. Then I got rid of the time zone and milliseconds, same result ☹

---

<div class="post-metadata">

**Author:** ![lthms](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/lthms/32/124_2.png) [@lthms](https://discourse.pijul.org/u/lthms)\
**Post date:** [May 2, 2020, 8:27pm UTC](https://discourse.pijul.org/t/what-format-does-date-expect/483/4 "2020-05-02T20:27:39Z")

</div>

I once wanted to use `--date` and I remember having to go through Rust documentation to find out which format to use.

That being said, I [had a look to my old pijul-8 to pijul-9 converter](https://nest.pijul.com/lthms/pijul-conv:master/2051a88f0518d7b702) and it apprears that, at least at some point, using the date outputed by pijul worked :\

---

<div class="post-metadata">

**Author:** ![dywedir](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/dywedir/32/180_2.png) [@dywedir](https://discourse.pijul.org/u/dywedir)\
**Post date:** [May 3, 2020, 11:54am UTC](https://discourse.pijul.org/t/what-format-does-date-expect/483/5 "2020-05-03T11:54:41Z")

</div>

This should work:

```
pijul record --date=2020-05-05T22:54:58Z
```

---

<div class="post-metadata">

**Author:** ![lthms](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/lthms/32/124_2.png) [@lthms](https://discourse.pijul.org/u/lthms)\
**Post date:** [May 5, 2020, 10:49am UTC](https://discourse.pijul.org/t/what-format-does-date-expect/483/6 "2020-05-05T10:49:28Z")

</div>

This rings a bell indeed! Thanks.

---

<div class="post-metadata">

**Author:** ![tae](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/tae/32/81_2.png) [@tae](https://discourse.pijul.org/u/tae)\
**Post date:** [May 10, 2020, 10:41am UTC](https://discourse.pijul.org/t/what-format-does-date-expect/483/7 "2020-05-10T10:41:52Z")

</div>

Thanks folks! That works
