[QFJ-228] Weekly session schedule calculates wrong day for non-GMT timezone Created: 24/Aug/07 Updated: 11/Feb/09 Resolved: 25/Aug/07 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Engine |
Affects Version/s: | 1.0.5 |
Fix Version/s: | 1.3.0 |
Type: | Bug | Priority: | Critical |
Reporter: | Christian Braeuner | Assignee: | Steve Bate |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
Any. Bug is happening on various Unix and Windows JREs |
Description |
This Friday morning our production system stopped at 00:30:00, rather than tomorrow, Saturday at 00:30:00, which caused a lot of trouble. We have changed the time zone of our session scheduling in the production system from GMT to America/Chicago to switch correctly for the US Daylight saving later this year. We have adjusted the start end end time accordingly to accomodate the new time zone. The setting is the following now: This equates to the same settings in GMT, which we had previously: So QF should have shut down tomorrow morning and not today on Friday morning. I've had a look into the QF source code and found that the start and end time do not wrap the day when the TZ offset is applied, because schedule days and times are treated separately. I have done the following temporary fix to correct this: SessionSchedule::SessionSchedule(...) > Calendar startTime = SystemTime.getUtcCalendar(); matcher = TIME_PATTERN.matcher(endTimeString); localTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher.group(1))); > Calendar endTime = SystemTime.getUtcCalendar();
|
Comments |
Comment by Steve Bate [ 24/Aug/07 ] |
Added unit test and modified code to handle this situation properly. Thanks for the report. |