Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021810Openbravo ERPA. Platformpublic2012-10-01 13:412013-03-07 18:16
egoitz 
AugustoMauch 
urgentminoralways
closedfixed 
5
3.0MP15 
3.0MP19pi 
shankarb
Core
No
0021810: The times are incorrectly exported when exporting the grid to csv
When exporting a grid to csv with a column containing a datetime or a time, the time is exported incorrectly.

-Go to process monitor window
-Export the grid
*See that starttime columns is exported with incorrect time.
In my case with two hours difference. It could be related with the timezone of the client.
No tags attached.
has duplicate defect 0039512 closed platform Some dates are exported wrong to spreadsheet 
related to defect 00232603.0MP22 closed AugustoMauch The time fields are not correctly exported to csv 
diff issue21810.diff (5,755) 2012-10-01 18:33
https://issues.openbravo.com/file_download.php?file_id=5619&type=bug
Issue History
2012-10-01 13:41egoitzNew Issue
2012-10-01 13:41egoitzAssigned To => AugustoMauch
2012-10-01 13:41egoitzModules => Core
2012-10-01 13:41egoitzResolution time => 1351724400
2012-10-01 18:33AugustoMauchFile Added: issue21810.diff
2012-10-02 09:33AugustoMauchStatusnew => scheduled
2012-10-02 09:33AugustoMauchfix_in_branch => pi
2012-10-08 10:05AugustoMauchIssue Monitored: dbaz
2012-10-08 10:05AugustoMauchReview Assigned To => dbaz
2012-10-08 10:05AugustoMauchfix_in_branchpi =>
2012-10-08 10:07AugustoMauchNote Added: 0053091
2012-10-08 10:09hgbotCheckin
2012-10-08 10:09hgbotNote Added: 0053092
2012-10-08 10:09hgbotStatusscheduled => resolved
2012-10-08 10:09hgbotResolutionopen => fixed
2012-10-08 10:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8c8d50bb5a14cdb5a2caafe3ff320be95e490145 [^]
2012-10-09 11:35dbazNote Added: 0053160
2012-10-09 11:35dbazStatusresolved => new
2012-10-09 11:35dbazResolutionfixed => open
2012-10-09 11:36dbazStatusnew => scheduled
2012-10-09 11:36dbazfix_in_branch => pi
2012-10-10 11:03hgbotCheckin
2012-10-10 11:03hgbotNote Added: 0053197
2012-10-10 11:03hgbotStatusscheduled => resolved
2012-10-10 11:03hgbotResolutionopen => fixed
2012-10-10 11:03hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/8c8d50bb5a14cdb5a2caafe3ff320be95e490145 [^] => http://code.openbravo.com/erp/devel/pi/rev/23fb5884456f91b3aadab7be8bb6a6163881ecd7 [^]
2012-10-11 07:50hudsonbotCheckin
2012-10-11 07:50hudsonbotNote Added: 0053254
2012-10-11 07:51hudsonbotCheckin
2012-10-11 07:51hudsonbotNote Added: 0053291
2012-10-11 14:34dbazNote Added: 0053309
2012-10-11 14:34dbazStatusresolved => closed
2012-10-11 14:34dbazFixed in Version => 3.0MP17
2012-11-19 18:14egoitzStatusclosed => new
2012-11-19 18:14egoitzResolutionfixed => open
2012-11-19 18:14egoitzFixed in Version3.0MP17 =>
2012-11-19 18:15egoitzPriorityurgent => immediate
2012-11-19 18:15egoitzfix_in_branchpi =>
2012-11-21 10:40jonalegriaesarteSeveritymajor => minor
2012-11-27 10:40AugustoMauchPriorityimmediate => urgent
2012-11-27 10:40AugustoMauchTarget Version3.0MP17 => 3.0MP19
2012-12-12 13:25AugustoMauchReview Assigned Todbaz => alostale
2012-12-12 13:25AugustoMauchTriggers an Emergency Pack => No
2012-12-12 13:25AugustoMauchIssue Monitored: alostale
2012-12-12 14:32hgbotCheckin
2012-12-12 14:32hgbotNote Added: 0054892
2012-12-12 14:32hgbotStatusnew => resolved
2012-12-12 14:32hgbotResolutionopen => fixed
2012-12-12 14:32hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/23fb5884456f91b3aadab7be8bb6a6163881ecd7 [^] => http://code.openbravo.com/erp/devel/pi/rev/eac109105095d886b9e5710f7a4bf0880fd42029 [^]
2012-12-17 13:34hudsonbotCheckin
2012-12-17 13:34hudsonbotNote Added: 0054995
2012-12-24 12:29AugustoMauchReview Assigned Toalostale => dbaz
2012-12-24 13:38AugustoMauchReview Assigned Todbaz => shankarb
2012-12-26 07:10shankarbNote Added: 0055186
2012-12-26 07:10shankarbStatusresolved => closed
2012-12-26 07:10shankarbFixed in Version => pi
2013-03-07 17:44egoitzRelationship addedrelated to 0023260
2013-03-07 18:16hgbotCheckin
2013-03-07 18:16hgbotNote Added: 0057150
2018-10-26 10:38alostaleRelationship addedhas duplicate 0039512

Notes
(0053091)
AugustoMauch   
2012-10-08 10:07   
The part of this fix done to the DataSourceServlet file only affects the CSV export process.

Test plan:
- Try to export a grid containing time columns (i.e. Process Monitor) using different client/server timezone configurations.
(0053092)
hgbot   
2012-10-08 10:09   
Repository: erp/devel/pi
Changeset: 8c8d50bb5a14cdb5a2caafe3ff320be95e490145
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Oct 08 10:04:09 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8c8d50bb5a14cdb5a2caafe3ff320be95e490145 [^]

Fixes issue 21810: Times are exported to CSV using client timezone

Before this fix, when a hour field was exported, it was done using the timezone of the server. Now the time offset used is the client's side.

In order to do this, when the user pushes the button to export a grid to CSV, the UTC offset of the client is sent to the server.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
---
(0053160)
dbaz   
2012-10-09 11:35   
Pending code-review changes
(0053197)
hgbot   
2012-10-10 11:03   
Repository: erp/devel/pi
Changeset: 23fb5884456f91b3aadab7be8bb6a6163881ecd7
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Oct 10 11:01:33 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/23fb5884456f91b3aadab7be8bb6a6163881ecd7 [^]

Fixes issue 21810: Timezone convertion refactored

The function OB.Utilities.Date.convertUTCTimeToLocalTime has been refactored:
- Instead of modifying the first parameter, it makes a copy and it returns the copy after converting its timezone
- It uses the new getUTCOffsetInMiliseconds function

The two places where the convertUTCTimeToLocalTime was used have been modified accordingly.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js
---
(0053254)
hudsonbot   
2012-10-11 07:50   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/63dfc135f2a1 [^]

Maturity status: Test
(0053291)
hudsonbot   
2012-10-11 07:51   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/63dfc135f2a1 [^]

Maturity status: Test
(0053309)
dbaz   
2012-10-11 14:34   
Reviewed @ changeset: 18201 - d5a54ef8d574
(0054892)
hgbot   
2012-12-12 14:32   
Repository: erp/devel/pi
Changeset: eac109105095d886b9e5710f7a4bf0880fd42029
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Dec 12 14:31:41 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/eac109105095d886b9e5710f7a4bf0880fd42029 [^]

Fixes issue 21810: Added a property to define the client time zone

There was a problem exporting to CSV date time columns to clients who reside in areas with not fixed UTC offsets (i.e., Spain timezone is UTC+0200 in the summer and UTC+0100 in the winter). This was because just the current timezone offset was sent to the server, and when a date from another timezone offset had to
be exported, it was done incorrectly.

This has been fixed by adding a property called localTimeZoneID, which is the user has to use in a preference in order to define his timezone identifier. The
complete list of all available timezone IDs can be found here: http://www.java2s.com/Tutorial/Java/0120__Development/GettingallthetimezonesIDs.htm. [^]

If the user does not specify a time zone id, or if he specifies an invalid one, the exporting process will keep working as it used to (dates that have an UTC offset different to the current date will not be properly exported).

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
M src-db/database/sourcedata/AD_REF_LIST.xml
---
(0054995)
hudsonbot   
2012-12-17 13:34   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c79ef1b1f830 [^]

Maturity status: Test
(0055186)
shankarb   
2012-12-26 07:10   
Verified in pi @ changeset faf2790df3d2
(0057150)
hgbot   
2013-03-07 18:16   
Repository: erp/devel/pi
Changeset: 141b8d2ba8dca36f64a783d88aab7489b775b29e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Mar 07 18:14:20 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/141b8d2ba8dca36f64a783d88aab7489b775b29e [^]

Fixes issue 23260: Time fields are exported properly to CSV

In the fix of the issue 21810 [1] a change was done to export the DateTime columns properly to CSV. This fix did not apply to Time fields, so when a time column was exported to CSV it could belong to the wrong timezone.

This fix applies the fix of the DateTime columns to the Time columns.

[1] https://issues.openbravo.com/view.php?id=21810 [^]

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
M src/org/openbravo/base/model/Property.java
---