在 Twig 中有内置的 date 过滤器。你可以传递任何 strtotime 兼容的参数。 <li>{{ user.expired | date('U') }}</li> U是显示Unix时间戳的格式。