PHP returns different week number then system

I came across problem in PHP script that returns week number one higher then system does. In both situations timezone is set to “Europe/Prague”.

I’ve done some tests. Both tests were performed on Debian 8.2 with PHP 5.6.14-0+deb8u1.

date +%W

result was: 43

echo date("W");

result was: 44

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s