Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019070Openbravo ERPA. Platformpublic2011-11-15 12:122011-12-22 11:53
0019070: When you enter a date previous to 01-01-0100 the date changed when you save
When you enter a date previous to 01-01-0100 the date selector is allowing to do it (no warnings shown) but when you save the record the date is recalculated.

For example, if you enter 01-01-0001, you will see after saving it 01-01-1901 (in database 01-01-0001 is stored).

In 2.50 it is allowed to enter 01-01-0001 and it is working fine, is correctly stored in database.

In fact, if you come from a 2.50 and you have documents in a date previous to 01-01-0100 (for example we recommend it for opening a balance [^]) although in database is stored properly because it was saved in 2.50, the user will see other value in the interface.
1) Create a new sales order
2) Enter in any date selector: 01-01-0001
2) Click on save button
Realize that the date is changed to 01-01-1901
No tags attached.
related to defect 00184843.0MP5 closed mtaal Fields Updated and Created do not have the hour 
png Date changed when saving.png (67,256) 2011-11-15 12:12
Issue History
2011-11-15 12:12miruritaNew Issue
2011-11-15 12:12miruritaAssigned To => alostale
2011-11-15 12:12miruritaFile Added: Date changed when saving.png
2011-11-15 12:12miruritaModules => Core
2011-11-15 16:30miruritaTarget Version => 3.0MP7
2011-11-15 16:56alostaleRelationship addedrelated to 0018484
2011-12-12 10:00mtaalAssigned Toalostale => mtaal
2011-12-13 17:29hgbotCheckin
2011-12-13 17:29hgbotNote Added: 0043851
2011-12-13 17:29hgbotStatusnew => resolved
2011-12-13 17:29hgbotResolutionopen => fixed
2011-12-13 17:29hgbotFixed in SCM revision => [^]
2011-12-13 17:32mtaalNote Added: 0043852
2011-12-14 10:44hudsonbotCheckin
2011-12-14 10:44hudsonbotNote Added: 0043866
2011-12-22 11:53dbazNote Added: 0044005
2011-12-22 11:53dbazStatusresolved => closed
2011-12-22 11:53dbazFixed in Version => 3.0MP7

2011-12-13 17:29   
Repository: erp/devel/pi
Changeset: b35b26fe024d10617f8e1eba1e056eed3a613173
Author: Martin Taal <martin.taal <at>>
Date: Tue Dec 13 17:29:23 2011 +0100
URL: [^]

Fixes issue 19070: When you enter a date previous to 01-01-0100 the date changed when you save
Change parsing of xml schema date to use js date function setFullYear

M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
2011-12-13 17:32   
The change touches the parsing of all dates which are returned when reading data from the server. The change is a copy of existing SC code which is being replaced to make one small change in the method:
d.setFullYear instead of d.setYear

So the change (compared to the original SC code) is on the other hand very small. See this SC forum post: [^]

To test: test setting dates in sales order and other windows.
2011-12-14 10:44   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]

Maturity status: Test
2011-12-22 11:53   
Reviewed @ changeset 14953 - 296d6aad21a5