Date helper returns wrong time if date() function is used

Notice: This thread is very old.
medhi
Generous Backer | 236
+
0
-

I have a template with this:

{date('d', 1408226400)}
{strftime('%d', 1408226400)}
{1408226400|date:'%d'}
{1408226400|date:'d'}

It should render four equal numbers. But it renders 17 17 17 16

There is some problem width date helper, probably something with timezone.

Nette 2.2

In config.neon:

php:
	date.timezone: Europe/Prague

Can you help me find where is the problem?

Jan Tvrdík
Nette guru | 2573
+
+2
-

It's a bug in Nette 2.2, I'm going to send a fix now.


Done

Last edited by Jan Tvrdík (2014-08-17 16:15)