mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
27 lines
543 B
Python
27 lines
543 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
|