jython2.7.0 DATE issue

"Tami Takamiya" <[email protected]> Thu, 4 Feb 2016 16:35:34 -0500
Newsgroups gmane.comp.lang.jython.user
Message-ID <[email protected]>
Last year, I posted a question on zxJDBC + jython2.7.0 DATE issue, but it 
was not really a zxJDBC issue.

Instead, there seems an issue somewhere in JTable-related code. 
When I ran the attached code with Jython 2.7.0, I see "2015-12-30" and 
"2015-12-31", which should be  "2015-12-31" and "2016-01-01".
When  I ran the attached code with Jython 2.5.3, I see correct results.

Can I report this as a bug? 

Tami Takamiya

====
from javax.swing import JFrame, JTable, JScrollPane
from javax.swing.table import DefaultTableModel
from datetime import date

class TableViewer(JFrame):
    def __init__(self):
        data = [[1, date(2015, 12, 31)], [2, date(2016, 1, 1)]]
        columnNames = ['Number', 'Date']
        table = JTable()
        table.setModel(DefaultTableModel(data, columnNames))
        self.add(JScrollPane(table))
 
        self.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
        self.pack()
        self.visible = True

viewer = TableViewer()
====


Tami Takamiya/Raleigh/IBM@IBMUS wrote on 06/23/2015 10:15:47 AM:

> From: Tami Takamiya/Raleigh/IBM@IBMUS
> To: [email protected]
> Date: 06/23/2015 10:17 AM
> Subject: [Jython-users] zxJDBC + jython2.7.0 DATE issue
> 
> Hello, 
> 
> We have been using an in-house Swing GUI application written in 
> jython script with zxJDBC to query data stored in our database (IBM 
DB2). 
> 
> One of our developer noticed that the dates stored in database were 
> incorrectly displayed on the application.  The dates displayed are 
> one-day prior to the correct dates. 
> For example, if the correct date is 2015-02-15, 2015-02-14 is displayed. 

> 
> I found the problem occurs when jython2.7.0 is used.  No problem was
> found when the same script was invoked with jython2.5.3.  The same 
> JDBC driver was used for both jython versions. 
> 
> So I am guessing there might be a bug in newer zxJDBC code... Is it 
> a known issue?  Thank you. 
> 
> Tami Takamiya
> 
------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors 
> network devices and physical & virtual servers, alerts via email & sms 
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
> _______________________________________________
> Jython-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jython-users

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

_______________________________________________
Jython-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-users