Test.isRunningTest() - Returns true if the currently executing code was called by code contained in a test method, false otherwise. so only when test class is executed then only days will be zero. otherwise that block of code wont execute and data will be fetched from custom settings.

Please select it as best answer so that it will help other people who might be facing same issue.