Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-276

Job scheduler timezones not handled correctly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: Loan
    • Labels:

      Description

      Reported by Sander at https://mifosforge.jira.com/browse/MIFOSX-1269
      Original Description:
      When investigating some issues with the overdue loan portfolio we found out that the current way the jobs are handled can cause differences in the figures for tenants by not picking up the correct date.
      The server has the timezone set to UTC/GMT. When a cronjob is added with a cron entry to run at 0:01 every day, the java scheduler converts this into the timezone of the tenant (UTC+3 in this example). In this case this results in the actual schedule to be kicked off at 21:01 the day before.
      When the job then triggers it on 21:01 on 01-06-2014 it uses the mysql CURDATE() feature to decide on the current date, but this returns in UTC, therefore reporting everything against 01-06-2014, instead of 02-06-2014 which was the expected (based on timezone UTC+3).
      In this case the arrears are updated incorrectly, but same applies to prepayments and all other jobs that happen in the gap between UTC and the tenant timezone.
      Workaround: Update the cronjob entry to run at 03:01 (UTC+3) by default, this then gets converted into 0:01 (UTC) and therefore it uses 02-06-2014 as the date.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                santoshmath Santosh Math
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: