While using those files from v1.5.4 can help, since the site is using v1.5.1 from 2012 it doesn't have the necessary code in the database query-factory to also set the timezone in the database. The query_factory code from 1.5.4 is not compatible with 1.5.1 because they use different parts of PHP. The v1.5.1 code uses the obsolete no-longer-supported mysql_ functions, and the v1.5.4 code uses the modern supported mysqli_ functions.

THE BEST SOLUTION IS TO UPGRADE, not just throw patches at it.