This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 206631 - Incorrect database updating of dates using CRUD user interfaces
Summary: Incorrect database updating of dates using CRUD user interfaces
Status: RESOLVED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: MySQL (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-22 02:49 UTC by SheeGhee
Modified: 2011-12-23 21:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen shots of actual CRUD processing error. (2.36 MB, application/msword)
2011-12-22 04:27 UTC, SheeGhee
Details
Replace first attachment with PDF alternative so that next reader has not to risk its computer (709.71 KB, application/pdf)
2011-12-23 21:06 UTC, matthias42
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SheeGhee 2011-12-22 02:49:20 UTC
I used the 7.0.1 IDE to create web applications for a MySQL database.  The generic CRUD web application subtracted one day from the date originally entered into the web based user interface and stored the wrong date in the MySQL database.  The error is thoroughly documented in the attached video.
Comment 1 SheeGhee 2011-12-22 04:27:59 UTC
Created attachment 114401 [details]
Screen shots of actual CRUD processing error.
Comment 2 matthias42 2011-12-23 19:05:26 UTC
It would help if you exactly describe what you did. There are several sample applications (at least two crud examples) bundled with netbeans. So what steps did you take? Can you provide a simple sample, that demonstrates the problem?

Word documents are the worst way to document errors. Most people won't open them and putting a video into such a document to distribute it only tops that. You can attach videos/images directly to the bug and refer to them in this text.
Comment 3 matthias42 2011-12-23 21:06:25 UTC
Created attachment 114438 [details]
Replace first attachment with PDF alternative so that next reader has not to risk its computer
Comment 4 matthias42 2011-12-23 21:20:03 UTC
Info from Reporter by Mail:
The MySQL database and its contents 
were NOT created using the Net Beans IDE.  The CRUD user interfaces were created using the instructions located at http://netbeans.org/kb/docs/web/jsf20-crud.html. Your website DOESN'T allow large data files to be uploaded.  The screen shots within the Word document more than adequately illustrate the problem.  This not an isolated occurrence.  It happened consistently when I tried to create new records in the apptmts table using the CRUDS to create a new record.  The date information is being saved incorrectly in the apptmts database table.
Comment 5 matthias42 2011-12-23 21:37:20 UTC
Ok - reproduced this - but it's not a bug in netbeans but could be in jsf.

I created a sample project without a timezone and created a record for 02/07/2012
 this made it correctly to the server (my mysql server is in CET) but on the way back was modified. In this case throwing a debugger at the problem proves interesting - entering the date above into the JSF Page invokes the setter of the entity with:

Tue Feb 07 01:00:00 CET 2012 (see the one hour offset - explained by converting from GMT to CET)

The mysql server discards the time informations and return on query:

Tue Feb 07 00:00:00 CET 2012

which in turn is converted to GMT resulting in

Mon Feb 06 23:00:00

which is then displayed as 02/06/2012. 

The rest is history :-)

Closing as invalid.