date() returns incorrect value if used from WordPress theme, but correct otherwise

OK, I found the answer myself. Turns out that in WordPress the UTC time is hardcoded and thus using PHP’s date() will always return UTC. Instead you should use WP’s function current_time(). Here are more details

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)