Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027628Openbravo ERPA. Platformpublic2014-09-17 17:322014-12-30 23:26
caristu 
AugustoMauch 
urgentmajoralways
closedfixed 
5
3.0PR14Q3.1 
3.0PR15Q13.0PR15Q1 
AugustoMauch
Core
pi
No
0027628: Some DateTime fields are not converted to the proper timezone
Some DateTime fields are not converted to the proper timezone (See attached) if they are not displayed in grid view
1) Create a new column of type DateTime, for example in the m_productprice table
2) Create a field for this new column
Attached module with steps 1) and 2)
3) Do the following update in the database, in order to have the same dates in the new column and in the updated column: update m_productprice set newcolumn = updated
4) Put the server and the client in different timezones, for example the server in GMT+1 and the client in GMT+2
5) Access from the client to the Price tab in the Product window. Notice that the conversion is not applied for the new field.
6) Display the field in grid view. Notice that now the field is showing the correct time both in form and in grid view.

Alternative steps (can be reproduced in livebuilds.openbravo.com):
1. Set different timezones in browser and server
2. Go to Process monitor
3. In grid select a record and check its Start Time
4. Go to form view -> OK same Start Time is shown
5. Go back to grid view and remove Start Time column from grid
6. Go to form view -> Start Time has changed
No tags attached.
causes defect 0028265 closed AugustoMauch Fields defined as DateTime with a default value @#Date@ don't work 
causes defect 0028541 closed alostale DateTime Reference is not working well in certain cases 
png dateTime.png (5,541) 2014-09-17 17:32
https://issues.openbravo.com/file_download.php?file_id=7255&type=bug
png

gz org.openbravo.support.tar.gz (1,847) 2014-11-11 09:28
https://issues.openbravo.com/file_download.php?file_id=7497&type=bug
Issue History
2014-09-17 17:32caristuNew Issue
2014-09-17 17:32caristuAssigned To => AugustoMauch
2014-09-17 17:32caristuFile Added: dateTime.png
2014-09-17 17:32caristuModules => Core
2014-09-17 17:32caristuTriggers an Emergency Pack => No
2014-09-17 17:33caristuIssue Monitored: networkb
2014-09-17 17:36caristuResolution time => 1417388400
2014-09-17 17:36caristuversion => 3.0PR14Q3.1
2014-09-17 17:36caristuTarget Version => 3.0PR14Q4
2014-09-22 16:36jonalegriaesarteTarget Version3.0PR14Q4 => 3.0PR15Q1
2014-11-11 09:28caristuFile Added: org.openbravo.support.tar.gz
2014-11-11 09:29caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7011#r7011
2014-11-12 09:08caristuDescription Updatedbug_revision_view_page.php?rev_id=7018#r7018
2014-11-12 09:08caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7019#r7019
2014-11-12 09:09caristuDescription Updatedbug_revision_view_page.php?rev_id=7020#r7020
2014-11-12 09:09caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7021#r7021
2014-11-12 09:10caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7024#r7024
2014-11-12 12:10alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7030#r7030
2014-11-12 13:09alostaleNote Added: 0071606
2014-11-18 11:52hgbotCheckin
2014-11-18 11:52hgbotNote Added: 0071753
2014-11-18 11:52hgbotStatusnew => resolved
2014-11-18 11:52hgbotResolutionopen => fixed
2014-11-18 11:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a86294635ce386152bb473773b0c9ba45f81fa81 [^]
2014-11-18 11:59alostaleNote Added: 0071754
2014-11-19 08:16alostaleReview Assigned To => AugustoMauch
2014-11-24 17:57AugustoMauchNote Added: 0071955
2014-11-24 17:57AugustoMauchStatusresolved => new
2014-11-24 17:57AugustoMauchResolutionfixed => open
2014-11-24 17:58AugustoMauchRegression level => Coding ( Testing )
2014-11-24 17:58AugustoMauchRegression date => 2014-11-18
2014-11-24 17:58AugustoMauchRegression introduced in release => pi
2014-11-24 17:58AugustoMauchRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/a86294635ce386152bb473773b0c9ba45f81fa81 [^]
2014-11-25 12:51AugustoMauchRegression levelCoding ( Testing ) =>
2014-11-25 12:51AugustoMauchRegression date2014-11-18 =>
2014-11-25 12:51AugustoMauchRegression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/a86294635ce386152bb473773b0c9ba45f81fa81 [^] =>
2014-11-25 12:51AugustoMauchRelationship addedcauses 0028265
2014-11-25 15:46hgbotCheckin
2014-11-25 15:46hgbotNote Added: 0071998
2014-11-25 15:46hgbotStatusnew => resolved
2014-11-25 15:46hgbotResolutionopen => fixed
2014-11-25 15:46hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/a86294635ce386152bb473773b0c9ba45f81fa81 [^] => http://code.openbravo.com/erp/devel/pi/rev/2c2841f894b42fdf358281c2d13af06452c788d6 [^]
2014-11-25 15:46hgbotCheckin
2014-11-25 15:46hgbotNote Added: 0071999
2014-11-25 15:47AugustoMauchNote Added: 0072000
2014-11-25 15:47AugustoMauchStatusresolved => closed
2014-11-25 15:47AugustoMauchFixed in Version => 3.0PR15Q1
2014-12-30 23:25hudsonbotCheckin
2014-12-30 23:25hudsonbotNote Added: 0073077
2014-12-30 23:26hudsonbotCheckin
2014-12-30 23:26hudsonbotNote Added: 0073139
2014-12-30 23:26hudsonbotCheckin
2014-12-30 23:26hudsonbotNote Added: 0073140
2015-01-08 12:45AugustoMauchRelationship addedrelated to 0028541
2015-01-08 15:30alostaleRelationship replacedcauses 0028541

Notes
(0071606)
alostale   
2014-11-12 13:09   
The problem is in FIC which is not properly calculating classicValue property

OK
        "EM_Obpf_Stddatetime": {
            "value": "2014-11-12T08:12:59.0Z",
            "classicValue": "12.11.2014 08:12:59"
        },

FAIL
        "EM_Obpf_Stddatetime": {
            "value": "2014-11-12T12:12:59.0Z",
            "classicValue": "12.11.2014 12:12:59"
        },
(0071753)
hgbot   
2014-11-18 11:52   
Repository: erp/devel/pi
Changeset: a86294635ce386152bb473773b0c9ba45f81fa81
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Nov 18 11:51:24 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a86294635ce386152bb473773b0c9ba45f81fa81 [^]

fixed bug 27628: date-time fields hidden in grid are not converted to proper tz

  When date time fields were hidden in grid and server and client were in different
  time zones, there were modifications in the time when moving to form view.

  The problem was FIC returned time in server's local time as it was read from DB.

  The fix:
   -FIC returns time in UTC
   -processFICReturn does the conversion
   -When invoking FIC UTC transformation is done (covers case of shown columns in grid)

---
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/main/ob-standard-view.js
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateTimeUIDefinition.java
---
(0071754)
alostale   
2014-11-18 11:59   
For all these cases
  -Client and server same timezone
  -Client and server positive timezone difference
  -Client and server negative timezone difference
  -24hr time format
  -12hr (am/pm) time format
  -Relative date-time reference (the one reported as buggy)
  -Absolute date-time
  -Relative time
  -Absolute time
  -Hidding columns from grid
  -Showing columns in grid
Tested
  -Creating a record and refreshing
  -From grid to form view navigation
  -Rereshing
  -Editing in grid
  -Editing in form
In all the cases
  -same values are kept
  -in case of relative time/date-time correct timezone transformations are done
  -in case of absolute time/date-time no transformation is done having client/server in different timezones
(0071955)
AugustoMauch   
2014-11-24 17:57   
Reopened because it causes https://issues.openbravo.com/view.php?id=28265 [^]
(0071998)
hgbot   
2014-11-25 15:46   
Repository: erp/devel/pi
Changeset: 2c2841f894b42fdf358281c2d13af06452c788d6
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Nov 25 15:44:05 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2c2841f894b42fdf358281c2d13af06452c788d6 [^]

Fixes issue 28265, fixes issue 27628: Prevents exception when parsing date

Instead of converting the date to String and then parsing it back to Date, just pass the Date object as a parameter to the convertLocalTimeToUTC method

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateTimeUIDefinition.java
---
(0071999)
hgbot   
2014-11-25 15:46   
Repository: erp/devel/pi
Changeset: d8acdd64b6bf08189eb7616f2ac1e3db2ae0b98a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Nov 25 15:45:15 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d8acdd64b6bf08189eb7616f2ac1e3db2ae0b98a [^]

Related with issue 27628: Renames method to convertLocalDateTimeToUTC

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateTimeUIDefinition.java
---
(0072000)
AugustoMauch   
2014-11-25 15:47   
Code reviewed and verified in pi@d8acdd64b6bf
(0073077)
hudsonbot   
2014-12-30 23:25   
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/6525fe229e06 [^]
Maturity status: Test
(0073139)
hudsonbot   
2014-12-30 23:26   
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/6525fe229e06 [^]
Maturity status: Test
(0073140)
hudsonbot   
2014-12-30 23:26   
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/6525fe229e06 [^]
Maturity status: Test