Bug 724690 (JBWFK-68)

Summary: Billing period in not generated w.r.t. time zone
Product: [JBoss] JBoss Enterprise WFK Platform 1 Reporter: Karel Piwko <kpiwko>
Component: SpringAssignee: Karel Piwko <kpiwko>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: medium    
Version: 1.2.0.ER02CC: kpiwko, mariusb
Target Milestone: ---   
Target Release: 1.2.0.ER03   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBWFK-68
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-04 06:07:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Karel Piwko 2011-03-27 09:28:18 UTC
securitylevel_name: Public

Billing period starts with Monday, but Monday is not necessarily the first day of week. Because TimeInterval forces time zone to EST, week actually starts by Sunday.

When running tests on Sunday, in computes interval from next Monday to next Sunday, leading to failure. This affects both WEEKLY and BI_WEEKLY invoicing.

Comment 2 Karel Piwko 2011-03-28 12:27:46 UTC
The fix leads to incorrect invoice generation in sporstclub/invoicing module.

E.g. on Sunday March, 27 the invoice for BI_WEEKLY subscriber Vetinari is generated to March, 26, which is not correct.

Comment 3 Marius Bogoevici 2011-03-29 20:26:55 UTC
Date normalization should have included milliseconds.

Comment 4 Karel Piwko 2011-03-30 12:41:20 UTC
Reopened as testing fails due to wrongly written test. Please include following commit http://git.engineering.redhat.com/?p=users/kpiwko/snowdrop-examples.git;a=commit;h=5fa77776520890d080dbed536ec4f48d2e0408be

Comment 5 Karel Piwko 2011-03-31 10:56:58 UTC
On March 31, 12:56 CET the testMonthly() test is failing. Something is wrong with this component.

Comment 6 Marius Bogoevici 2011-04-04 05:49:37 UTC
Hopefully, this time for good.

Comment 7 Karel Piwko 2011-04-04 06:07:47 UTC
Verified as fixed.