mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
25 lines
527 B
Python
25 lines
527 B
Python
|
#
|
||
|
# Adapter for java.util.Date
|
||
|
#
|
||
|
#
|
||
|
# SOFTWARE HISTORY
|
||
|
#
|
||
|
# Date Ticket# Engineer Description
|
||
|
# ------------ ---------- ----------- --------------------------
|
||
|
# 12/06/10 dgilling Initial Creation.
|
||
|
#
|
||
|
|
||
|
from dynamicserialize.dstypes.java.util import Date
|
||
|
|
||
|
ClassAdapter = 'java.util.Date'
|
||
|
|
||
|
|
||
|
def serialize(context, date):
|
||
|
context.writeI64(date.getTime())
|
||
|
|
||
|
|
||
|
def deserialize(context):
|
||
|
result = Date()
|
||
|
result.setTime(context.readI64())
|
||
|
return result
|