[QFJ-142] Weekday session schedule and default locale == Locale.FRENCH Created: 23/Feb/07  Updated: 04/Jul/07  Resolved: 19/May/07

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.0.5
Fix Version/s: 1.2.0

Type: Bug Priority: Default
Reporter: Guillaume Bedard Assignee: Steve Bate
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows XP Pro SP2, JDK 1.5.0_01


Issue Links:
Relates
relates to QFJ-162 Weekly session fails on Sundays Closed

 Description   

Whenever we instantiate an Initiator with the following sample session schedule settings, the engine considers that we are out of schedule because internally (in SessionSchedule.theMostRecentIntervalBefore(Calendar)), the interval start date is always after the end date for some reason:

SETTINGS
========
Locale.setDefault(Locale.FRENCH);
String[] WEEKDAYS = new DateFormatSymbols(Locale.getDefault()).getWeekdays();
settings.setString(mySessionID, Session.SETTING_TIMEZONE, "Europe/London");
settings.setString(mySessionID, Session.SETTING_START_DAY, WEEKDAYS[Calendar.SUNDAY]);
settings.setString(mySessionID, Session.SETTING_START_TIME, "22:15:00");
settings.setString(mySessionID, Session.SETTING_END_DAY, WEEKDAYS[Calendar.FRIDAY]);
settings.setString(mySessionID, Session.SETTING_END_TIME, "21:55:00");

LOG OUTPUT
===========
schedule is weekly, DIM 22:15:00 UTC - VEN 21:55:00 UTC (weekly, DIM 22:15:00 GMT - VEN 21:55:00 GMT)
Session state is not current; resetting FIX.4.2:...->...
Created session: FIX.4.2:...->...

As a workaround, temporarily forcing the default locale to Locale.ENGLISH and setting it back after solves the problem, but otherwise, the SessionSchedule.theMostRecentIntervalBefore(Calendar) method seems to have issues.

Furthermore, having to use internationalized week day String values is also a bit awkward (see above example).

Thanking you in advance,

Guillaume



 Comments   
Comment by Steve Bate [ 10/May/07 ]

I'm not sure but this may be related to QFJ-162.

Comment by Steve Bate [ 19/May/07 ]

I've added tests and, by default, I'm running the unit test in a non-US locale to help catch these problems earlier in the future.

Generated at Sat Nov 23 07:36:27 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.