You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Garrett Conaty (JIRA)" <qp...@incubator.apache.org> on 2008/12/24 05:36:44 UTC

[jira] Created: (QPID-1551) Timestamps incorrectly encoded as milliseconds rather than seconds

Timestamps incorrectly encoded as milliseconds rather than seconds
------------------------------------------------------------------

                 Key: QPID-1551
                 URL: https://issues.apache.org/jira/browse/QPID-1551
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
    Affects Versions: M4
            Reporter: Garrett Conaty


It appears that datetime/timestamp values are being encoded by the Qpid Java client as the number of milliseconds (specifically a timestamp is System.currentTimeMillis(), whereas from the AMQP Spec (pick 0-8 onwards)

"Time stamps are held in the 64-bit POSIX time_t format with an accuracy of one second. By using 64 bits 
we avoid future wraparound issues associated with 31-bit and 32-bit time_t values."

Is this accurate or perhaps I"m missing something in the JMS layer that wants it to be milliseconds rather than seconds.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (QPID-1551) Timestamps incorrectly encoded as milliseconds rather than seconds

Posted by "Robert Greig (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659070#action_12659070 ] 

Robert Greig commented on QPID-1551:
------------------------------------

In the javadoc for javax.jms.Message it states:

"Date and time values should use the standard long millisecond value. When a date or time literal is included in a message selector, it should be an integer literal for a millisecond value. The standard way to produce millisecond values is to use java.util.Calendar"

> Timestamps incorrectly encoded as milliseconds rather than seconds
> ------------------------------------------------------------------
>
>                 Key: QPID-1551
>                 URL: https://issues.apache.org/jira/browse/QPID-1551
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M4
>            Reporter: Garrett Conaty
>
> It appears that datetime/timestamp values are being encoded by the Qpid Java client as the number of milliseconds (specifically a timestamp is System.currentTimeMillis(), whereas from the AMQP Spec (pick 0-8 onwards)
> "Time stamps are held in the 64-bit POSIX time_t format with an accuracy of one second. By using 64 bits 
> we avoid future wraparound issues associated with 31-bit and 32-bit time_t values."
> Is this accurate or perhaps I"m missing something in the JMS layer that wants it to be milliseconds rather than seconds.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (QPID-1551) Timestamps incorrectly encoded as milliseconds rather than seconds

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659077#action_12659077 ] 

Aidan Skinner commented on QPID-1551:
-------------------------------------

>From ctime(3):  "When interpreted as  an absolute time value, it represents the  number  of  seconds  elapsed  since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC)."
>From System.currentTimeMillis Javadoc: "the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC."

Looks like we need to do a conversion from framing to JMS and back again.

> Timestamps incorrectly encoded as milliseconds rather than seconds
> ------------------------------------------------------------------
>
>                 Key: QPID-1551
>                 URL: https://issues.apache.org/jira/browse/QPID-1551
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M4
>            Reporter: Garrett Conaty
>
> It appears that datetime/timestamp values are being encoded by the Qpid Java client as the number of milliseconds (specifically a timestamp is System.currentTimeMillis(), whereas from the AMQP Spec (pick 0-8 onwards)
> "Time stamps are held in the 64-bit POSIX time_t format with an accuracy of one second. By using 64 bits 
> we avoid future wraparound issues associated with 31-bit and 32-bit time_t values."
> Is this accurate or perhaps I"m missing something in the JMS layer that wants it to be milliseconds rather than seconds.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.