This simple patch adds the date [ using php date(r,timestamp) format ] the Available updates page was generated. The time ago output is also preserved.

Comments

tic2000’s picture

You should use format_date() instead of date()

Status: Needs review » Needs work

The last submitted patch failed testing.

stevenpatz’s picture

Status: Needs work » Needs review
StatusFileSize
new975 bytes

Updated patch to use format_date

tic2000’s picture

Status: Needs work » Needs review
+  $output = '<div class="update checked">'. t('Last Checked: ') . format_date($last,'medium') . ($last ? t(' (<b>@time ago</b>)', array('@time' => format_interval(time() - $last)) ) : t('Last checked: never'));
+

1. In D7 the string concatenation is done with a space before and after the .. Even before D7 you need to have a space after a , (take a look at the format_date parameters).
2. The string inside t() it should not start or end with a space.
3. You should follow the example you already have in the code you change and append the date as the time ago is. This way you will also get rid of the error in your patch that makes a "Last Checked: Last checked: never" message appear when there is no value for $last.
4. One too many new lines.
5. Why do you change REQUEST_TIME to $last?

Status: Needs review » Needs work

The last submitted patch failed testing.

dww’s picture

Status: Needs review » Closed (duplicate)