How can I get timestamp value in Twig?

Mehedi Hasan picture Mehedi Hasan · Apr 1, 2014 · Viewed 40.7k times · Source

How can I get timestamp value in twig as I know date formatting is possible in twig but don't know how to get timestamp value using twig function;

Answer

greg picture greg · Sep 22, 2014

There is other solution that might be easier to understand by designers.

{{ 'now'|date('U') }}

(I am aware that the question is already answered and it's old)