Skip to content

Commit df232fc

Browse files
authored
Fixed another localizeddate usage
1 parent 7ee78ce commit df232fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/Resources/views/blog/post_show.html.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
<div class="row post-comment">
3333
<h4 class="col-sm-3">
3434
<strong>{{ comment.authorEmail }}</strong> {{ 'post.commented_on'|trans }}
35-
<strong>{{ comment.publishedAt|localizeddate('medium', 'short') }}</strong>
35+
{# it's not mandatory to set the timezone in localizeddate(). This is done to
36+
avoid errors when the 'intl' PHP extension is not available and the application
37+
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
38+
<strong>{{ comment.publishedAt|localizeddate('medium', 'short', null, 'UTC') }}</strong>
3639
</h4>
3740
<div class="col-sm-9">
3841
{{ comment.content|md2html }}

0 commit comments

Comments
 (0)