# Problem with \<lastBuildDate\> from Feed plugin?

**URL:** <https://forum.getkirby.com/t/problem-with-lastbuilddate-from-feed-plugin/1822>\
**Category:** Plugins\
**Created:** [August 13, 2015, 9:00pm UTC](https://forum.getkirby.com/t/problem-with-lastbuilddate-from-feed-plugin/1822 "2015-08-13T21:00:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bensmithuk](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@bensmithuk](https://forum.getkirby.com/u/bensmithuk)\
**Post date:** [August 13, 2015, 9:00pm UTC](https://forum.getkirby.com/t/problem-with-lastbuilddate-from-feed-plugin/1822/1 "2015-08-13T21:00:07Z")

</div>

I was having a problem with the RSS feed on the new Kirby-based site I’m building . In the feed I’m seeing:

```
<lastBuildDate>
<br/>
<b>Warning</b>
: date() expects parameter 2 to be long, string given in
<b>
/var/www/v2.getkirby.com/site/plugins/feed/template.php
</b>
on line
<b>8</b>
<br/>
</lastBuildDate>

```

I’ve just checked and the same message is appearing in the feed from the official Kirby blog too.

Am I right in thinking the $modified item in line 8 of the template.php is missing something?

```
    <lastBuildDate><?php echo date('r', $modified) ?></lastBuildDate>
```

---

<div class="post-metadata">

**Author:** ![bensmithuk](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@bensmithuk](https://forum.getkirby.com/u/bensmithuk)\
**Post date:** [August 13, 2015, 9:13pm UTC](https://forum.getkirby.com/t/problem-with-lastbuilddate-from-feed-plugin/1822/2 "2015-08-13T21:13:57Z")

</div>

I’ve just amended the line to:

```
    <lastBuildDate><?php echo date('r', $site->modified()) ?></lastBuildDate>

```

I don’t know if this is correct - it certainly produces a correct-looking output but I’m no coder.

---

<div class="post-metadata">

**Author:** ![flokosiol](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/flokosiol/32/468_2.png) [@flokosiol](https://forum.getkirby.com/u/flokosiol)\
**Post date:** [August 14, 2015, 4:34am UTC](https://forum.getkirby.com/t/problem-with-lastbuilddate-from-feed-plugin/1822/3 "2015-08-14T04:34:20Z")

</div>

The warning message says, that `$modified`which is the second parameter in the mentioned `date()`method gets a string, but needs long (which is kind of integer). So this should also work …

```auto
<lastBuildDate><?php echo date('r', (int)$modified) ?></lastBuildDate>

```

[Edit] I just saw, that there’s an open issue for that: [https://github.com/getkirby/plugins/issues/21](https://github.com/getkirby/plugins/issues/21)

---

<div class="post-metadata">

**Author:** ![bensmithuk](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@bensmithuk](https://forum.getkirby.com/u/bensmithuk)\
**Post date:** [August 14, 2015, 8:36am UTC](https://forum.getkirby.com/t/problem-with-lastbuilddate-from-feed-plugin/1822/4 "2015-08-14T08:36:19Z")

</div>

Thank you - I don’t really know my way round Git, but good to hear it’s known-about.
