python-awips/dynamicserialize/adapters/TimestampAdapter.py
Shay Carter 67c5c0b579 add in the /awips and /dynamicsearlize directories
- see if this satisfies the webpage building
2021-06-08 15:41:53 -06:00

23 lines
533 B
Python

#
# Adapter for java.sql.Timestamp
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 06/30/11 dgilling Initial Creation.
#
from dynamicserialize.dstypes.java.sql import Timestamp
ClassAdapter = 'java.sql.Timestamp'
def serialize(context, timestamp):
context.writeI64(timestamp.getTime())
def deserialize(context):
result = Timestamp(context.readI64())
return result