I'm programming in Jython and I would like to convert a java.util.GregorianCalendar datetime instance to a Jython datetime value.

I've tried this:

```
from java.util import Calendar, GregorianCalendar
import datetime

x = GregorianCalendar.getInstance()

y = datetime(x.YEAR, x.MONTH, x.DAY_OF_MONTH, x.HOUR_OF_DAY, x.MINUTE, x.SECOND, x.MILLISECOND)

```

But I get the following error: 

```
TypeError: 'module' object is not callable

```

Then I ran this and I was surprised to see the wrong values written to the log. For instance, the year is suppposed to be 2020, but in the log it says "1".

```
from java.util import Calendar, GregorianCalendar
import datetime

x = GregorianCalendar.getInstance()

print x
print "Year", x.YEAR
print "Month",x.MONTH
print "Day", x.DAY_OF_MONTH
print "Hour", x.HOUR_OF_DAY
print "Minute", x.MINUTE
print "Second", x.SECOND
print "Millisecond", x.MILLISECOND
print x.getTime()

```

Log:

```
java.util.GregorianCalendar[time=1591195394508,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Berlin",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=143,lastRule=java.util.SimpleTimeZone[id=Europe/Berlin,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2020,MONTH=5,WEEK_OF_YEAR=23,WEEK_OF_MONTH=1,DAY_OF_MONTH=3,DAY_OF_YEAR=155,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=1,AM_PM=1,HOUR=4,HOUR_OF_DAY=16,MINUTE=43,SECOND=14,MILLISECOND=508,ZONE_OFFSET=3600000,DST_OFFSET=3600000]
Year 1
Month 2
Day 5
Hour 11
Minute 12
Second 13
Millisecond 14
Wed Jun 03 16:43:14 CEST 2020

```

Could anybody tell me what I am doing wrong?