Skip to content

How to read time fields? #15

@ophiry

Description

@ophiry

i'm having troubles reading time objects - the resulting object contains an 8 byte binary buffer, but I'm not sure how to interpret it

example: (serialized date is around 1/1/2016)

serialized_time_object = '\xac\xed\x00\x05sr\x00\rjava.time.Ser\x95]\x84\xba\x1b"H\xb2\x0c\x00\x00xpw\x08\x05\x00\x00\x07\xe0\x01\x01\xffx'

time_object = javaobj.loads(serialized_time_object)

time_object.__dict__

{'annotations': ['\x05\x00\x00\x07\xe0\x01\x01\xff'], 'classdesc':
[java.time.Ser:0x-6AA27B45E4DDB74E]}

struct.unpack('L',time_object.annotations[0])(0)

18374970016350076933L

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions