As reported by paxed in IRC, sometimes the function for expire_date has
troubles and you get an apache internal server error page and log errors
like:
egweb: template error: date error - bad time/date string:
expects 'h:m:s d:m:y' got: '2015-01-31T00:00:00+0200'
Adding the ctx.parse_datetime() function to wrap the ctx.user.expire_date
resolves this problem.
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
<div style="width:662px;">
<div style="float:left;">
<div style="padding:10px 0px;">
- [%- IF date.format(ctx.user.expire_date, '%s') < date.format(date.now , '%s');
- fmt_expire_date = date.format(ctx.user.expire_date, DATE_FORMAT);
+ [%- IF date.format(ctx.parse_datetime(ctx.user.expire_date), '%s') < date.format(date.now , '%s');
+ fmt_expire_date = date.format(ctx.parse_datetime(ctx.user.expire_date), DATE_FORMAT);
%]
<span class="alert">[% l("Your library card expired on [_1]. Please contact a librarian to resolve this issue.", fmt_expire_date) %]</span>
[% END %]