fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santosh Math (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FINERACT-276) Job scheduler timezones not handled correctly
Date Wed, 07 Dec 2016 08:46:58 GMT
Santosh Math created FINERACT-276:
-------------------------------------

             Summary: Job scheduler timezones not handled correctly
                 Key: FINERACT-276
                 URL: https://issues.apache.org/jira/browse/FINERACT-276
             Project: Apache Fineract
          Issue Type: Bug
          Components: Loan
            Reporter: Santosh Math
            Assignee: Markus Geiss


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message