Get date function not working

You have to pass the second parameter $post to get_the_time('j'):

get_the_time( 'j', $post );

If you don’t WordPress will just use whatever the current global post object is.

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