Title: Message Title
|
|
|
A number of timezone related issues exist in the mifos-platform
1) Many SQL queries use now(), this would lead to potential errors when the timezone of the mysql database is different from the timezone of the tenant
A possible fix might be to set the timezone with the tenant specific mysql connection itself
2) Date formatters are used in multiple places, formatting a Timezone specific locale date with this date formatter (the timezone isn't set in the date formatter) would result in the dates being parsed based on the default format of the application server.
Ensure that all Date formatter formatters (java.util and joda ) have timezone set )
{code} /*java util*/ final DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); df.setTimeZone(DateUtils.getTimeZoneOfTenant());
/*joda*/ final DateTimeFormatter fmt = DateTimeFormat.forPattern("dd MM yyyy"); fmt.withZone(DateUtils.getDateTimeZoneOfTenant()); {code}
3) Ensure that all times/ date times used in the code are set with the right Timezone
In general, while getting a date in the system, ensure that you get them from org.mifosplatform.infrastructure.core.service.DateUtils.java class (returns the date/ local date based on the timezone of the tenant)
{code} final LocalDate transactionDate = DateUtils.getLocalDateOfTenant(); final Date todaysDate = DateUtils.getDateOfTenant() {code}
|
|
|
|
|
|
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Mifos-issues mailing list
Mifos-issues@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mifos-issues