Skip to content

Mac mismatch - possible timezone issue? #26

@mattheworiordan

Description

@mattheworiordan

A customer, when using the following auth code, gets "Request mac does not match"

$subscriberClient = new \Ably\AblyRest(array(
  'key' => $this->subscribeApiKey
));
$tokenDetails = $subscriberClient->auth->requestToken(array(), array(
  'queryTime' => false
));

However, when changing queryTime to true, the error goes away.

$subscriberClient = new \Ably\AblyRest(array(
  'key' => $this->subscribeApiKey
));
$tokenDetails = $subscriberClient->auth->requestToken(array(), array(
  'queryTime' => true
));

I checked with the customer, and it seems their local time was within at most a second of the actual time, so I suspect this could be a timezone issue. They are in France, so GMT +1.

I asked them to do the following:

In one console, do:
php -a
echo microtime(true);
and then in another window, at around the same time! do the following:
$ curl rest.ably.io/time
What is the difference in values ignoring the part of the decimal

Customer:
PHP : 1455545827.01
CURL : 1455545827562

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. It's clear that this does need to be fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions