+class wxDateTimePrinter:
+ def __init__(self, val):
+ self.val = val
+
+ def to_string(self):
+ # A value of type wxLongLong can't be used in Python arithmetic
+ # expressions directly so we need to convert it to long long first and
+ # then cast to int explicitly to be able to use it as a timestamp.
+ msec = self.val['m_time'].cast(gdb.lookup_type('long long'))
+ sec = int(msec / 1000)
+ return datetime.datetime.fromtimestamp(sec).isoformat(' ')
+