Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong message timestamp on 32-bit devices #525

Closed
disabled opened this issue Oct 19, 2016 · 3 comments
Closed

Wrong message timestamp on 32-bit devices #525

disabled opened this issue Oct 19, 2016 · 3 comments
Assignees

Comments

@disabled
Copy link

Hello,

We are using ably-php to send messages and ably-ios to receive them.
In this scenario, message timestamp on iOS is wrong (using either ARTRest or ARTRealtime), but only on 32-bit devices. On 64-bit devices everything is working fine.

Here is example:

(lldb) po message
<ARTMessage: 0x7a947140> {
 id: QT69HcQfip:0:0,
 clientId: (null),
 connectionId: (null),
 timestamp: 1969-12-23 02:33:04 +0000,
 encoding: (null),
 data: { ... },
 name: message
}

po [message.timestamp timeIntervalSince1970]
-768415.03600001335

@mattheworiordan
Copy link
Member

Hi @disabled. Nice Github handle :)

@ricardopereira @tcard can you please advise on this issue?

@tcard tcard self-assigned this Oct 21, 2016
tcard added a commit that referenced this issue Oct 21, 2016
We were converting timestamps to NSInteger, which is a 32-bit or 64-bit
int depending on the architecture. `long long` is guaranteed to be
64-bit wide.

Fixes #525.
tcard added a commit that referenced this issue Oct 22, 2016
We were converting timestamps to NSInteger, which is a 32-bit or 64-bit
int depending on the architecture. `long long` is guaranteed to be
64-bit wide.

Fixes #525.
@tcard
Copy link
Contributor

tcard commented Oct 22, 2016

Hi @disabled! Thanks for the report. I've just pushed a fix to the repo. It will be included in the next release. In the meantime, you can point your Podfile (or however you're including the library) to the current master branch head.

Please tell us if this actually fixes your problem, and of any other problem you may encounter. Thanks in advance!

@disabled
Copy link
Author

Hi @tcard. Thanks, timestamp is working fine now!

ricardopereira pushed a commit that referenced this issue Nov 1, 2016
We were converting timestamps to NSInteger, which is a 32-bit or 64-bit
int depending on the architecture. `long long` is guaranteed to be
64-bit wide.

Fixes #525.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants