2018-09-05 15:52:38 -06:00
|
|
|
#
|
|
|
|
# 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'
|
|
|
|
|
2018-10-14 17:37:08 -06:00
|
|
|
|
2018-09-05 15:52:38 -06:00
|
|
|
def serialize(context, timestamp):
|
|
|
|
context.writeI64(timestamp.getTime())
|
|
|
|
|
2018-10-14 17:37:08 -06:00
|
|
|
|
2018-09-05 15:52:38 -06:00
|
|
|
def deserialize(context):
|
|
|
|
result = Timestamp(context.readI64())
|
2018-09-06 12:11:36 -06:00
|
|
|
return result
|