python-awips/dynamicserialize/adapters/FormattedDateAdapter.py

30 lines
601 B
Python
Raw Permalink Normal View History

2015-06-18 10:25:33 -06:00
##
##
#
# Adapter for FormattedDate
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 9/21/2015 4486 rjpeter Initial creation.
#
2016-03-16 16:32:17 -05:00
#
#
2015-06-18 10:25:33 -06:00
from dynamicserialize.dstypes.com.raytheon.uf.common.time import FormattedDate
2015-06-18 10:25:33 -06:00
ClassAdapter = 'com.raytheon.uf.common.time.FormattedDate'
2015-06-18 10:25:33 -06:00
def serialize(context, date):
context.writeI64(date.getTime())
2015-06-18 10:25:33 -06:00
def deserialize(context):
result = FormattedDate()
result.setTime(context.readI64())
return result