2018-09-05 15:52:38 -06:00
|
|
|
#
|
|
|
|
# Adapter for java.util.Calendar
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# SOFTWARE HISTORY
|
|
|
|
#
|
|
|
|
# Date Ticket# Engineer Description
|
|
|
|
# ------------ ---------- ----------- --------------------------
|
|
|
|
# 09/29/10 wldougher Initial Creation.
|
|
|
|
#
|
|
|
|
|
|
|
|
from dynamicserialize.dstypes.java.util import GregorianCalendar
|
|
|
|
|
|
|
|
ClassAdapter = 'java.util.GregorianCalendar'
|
|
|
|
|
2018-10-14 17:37:08 -06:00
|
|
|
|
2018-09-05 15:52:38 -06:00
|
|
|
def serialize(context, calendar):
|
|
|
|
calTiM = calendar.getTimeInMillis()
|
|
|
|
context.writeI64(calTiM)
|
|
|
|
|
2018-10-14 17:37:08 -06:00
|
|
|
|
2018-09-05 15:52:38 -06:00
|
|
|
def deserialize(context):
|
|
|
|
result = GregorianCalendar()
|
|
|
|
result.setTimeInMillis(context.readI64())
|
|
|
|
return result
|