I just found out that if I call datetime() regulary it returns correct time,
but when I call it after including wordpress (include('wp-load.php');
) the datetime() starts to return one hour less time (UTC time).
Wordpress is set to UTC+1. So how do I fix this problem?
Perhaps there are timezone setting somewhere in wp-load.php
http://www.php.net/manual/en/function.date-default-timezone-set.php
You may declare timezone in your script or change timezone somewhere in included script (quess it is wordpress).