[
https://issues.apache.org/jira/browse/QPID-4804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13650971#comment-13650971
]
zhu zhu commented on QPID-4804:
-------------------------------
With the input being datetime format, the output should keep same with the
format(datetime). The fix to this issue is welcomed.
> datetime type and timestamp type convert problem in qpid python client
> ----------------------------------------------------------------------
>
> Key: QPID-4804
> URL: https://issues.apache.org/jira/browse/QPID-4804
> Project: Qpid
> Issue Type: Bug
> Components: Python Client
> Affects Versions: 0.18
> Environment: RedHat Linux
> Reporter: Fan Zhang
>
> When client input a value which is datetime type to qpid server, then server
> receive this value from qpid server, this value's type become
> timestamp(qpid.datatypes.timestamp), I think the value's type shouldn't
> change to timestamp.
> I think this code do the conversion in
> /usr/lib/python2.6/site-packages/qpid/codec010.py file:
> def read_datetime(self):
> return timestamp(self.read_uint64())
> def write_datetime(self, t):
> if isinstance(t, datetime.datetime):
> t = timestamp(t)
> self.write_uint64(t)
> I think maybe we need change code like this, change "return
> timestamp(self.read_uint64())" to "return
> datetime.datetime.fromtimestamp(timestamp(self.read_uint64()))"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]