Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042169Retail ModulesWeb POSpublic2019-10-31 17:332019-11-18 09:59
joniturralde93 
rqueralta 
urgentmajoralways
closedfixed 
5
 
RR20Q1 
guilleaer
No
0042169: Problems with business date when there is a change in timezone
When there is a change in timezone, business date for orders is incorrect.

Data can be fixed with a script.
1. Set local timezone to UTC+2
2. Open store Aneto Mountain Store -> Business date 05/11/2019 for instance
3. Login to AMS1001 https://livebuilds.openbravo.com/retail_modules_pgsql_pi/web/org.openbravo.retail.posterminal/?terminal=AMS1001#retail.pointofsale [^]
4. Create and complete a new sales order
5. Do a cashup
6. Close store Aneto Mountain Store
7. Change local timezone to UTC+1
8. Log in again and set business date as 06/11/2019.
Note: Here there is already a bug where you are shown current business date as 04-11-2019 so the bug has already started
9. Complete another sales order
10. Check sales order window in backoffice, both of the created orders have business date (and creation date) as 05/11/2019

Expected result:
First order -> 05/11/2019
Second order -> 06/11/2019

Also, the "current business date" shown when opening the till should be correct (05/11/2019)
No tags attached.
related to defect 0039565 closed javierRodriguez pOSSBusinessDate is changing the Date to the day before when the client is in another time zone than the server 
related to defect 0040318 closed ranjith_qualiantech_com pOSSBusinessDate is changing the Date to the day before when the client is in another time zone than the server 
Issue History
2019-10-31 17:33joniturralde93New Issue
2019-10-31 17:33joniturralde93Assigned To => Retail
2019-10-31 17:33joniturralde93Resolution time => 1574290800
2019-10-31 17:33joniturralde93Triggers an Emergency Pack => No
2019-10-31 21:28rafarodaIssue Monitored: rafaroda
2019-10-31 21:29rafarodaRelationship addedrelated to 0039565
2019-10-31 21:29rafarodaRelationship addedrelated to 0040318
2019-10-31 21:33rafarodaNote Added: 0115380
2019-11-05 12:11rafarodaNote Added: 0115411
2019-11-12 14:51rqueraltaAssigned ToRetail => rqueralta
2019-11-12 14:52rqueraltaStatusnew => scheduled
2019-11-14 13:22hgbotCheckin
2019-11-14 13:22hgbotNote Added: 0115605
2019-11-14 13:22hgbotStatusscheduled => resolved
2019-11-14 13:22hgbotResolutionopen => fixed
2019-11-14 13:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/b5b79be618f619e7e7add3e7512f041e49a0c4b4 [^]
2019-11-18 09:59guilleaerReview Assigned To => guilleaer
2019-11-18 09:59guilleaerStatusresolved => closed
2019-11-18 09:59guilleaerFixed in Version => RR20Q1

Notes
(0115380)
rafaroda   
2019-10-31 21:33   
When testing the fix please simulate hours changes of 2020.

Hours changes in Europe 2020 https://www.timeanddate.com/time/change/france?year=2020 [^]
* 29 Mar 2020
* 25 Oct 2020

Hour changes in North America https://www.timeanddate.com/time/change/usa/new-york?year=2020 [^]
* 8 Mar 2020
* 1 Nov 2020
(0115411)
rafaroda   
2019-11-05 12:11   
Please do the 4 tests stated above twice: 1 time with server located in Europe, and 1 time with server located in North America.
(0115605)
hgbot   
2019-11-14 13:22   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: b5b79be618f619e7e7add3e7512f041e49a0c4b4
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Nov 13 00:17:10 2019 +0000
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/b5b79be618f619e7e7add3e7512f041e49a0c4b4 [^]

Fixed issue 42169: Problems with business date when there is a change in timezone

- Changed the format that the businessDate is set in the POS to avoid the timezone
errors

---
M web/org.openbravo.retail.sessions/js/components/BusinessDateMain.js
---