Combination of API + DeleteAllCustomers + Unix timestamp + different Timezone causes issues

nikolas's Avatar

nikolas

19 Jul, 2011 03:46 PM

The Delete All Customers call will fail, even when specifying valid timestamp, if the creator of the product + the account that is used for the api have different time zones.

In order to Reproduce:
Account A:

  • Creator of Product 'P'
  • Timezone is set to Europe/Berlin (currently meaning +2)

Account B (API account):

  • Administrator (or even Owner of Product 'P')
  • Timezone is set to UTC (meaning +/- 0)

Now issue a DeleteAllCustomers call using the Account B credentials + a UTC time based UNIX timestamp (since the account B is using UTC) => Call fails due to inactivity.

Is this expected behavior? Is it possible to change the TimeZone of a product after creating it? Would it make sense to include an API TimeZone option on the Products setting page so that the same timezones are used across accounts when accessing the API (like the secret key)?

  1. 1 Posted by nikolas on 20 Jul, 2011 08:51 PM

    nikolas's Avatar

    After further testing I have to revert some of the statements from the earlier post, I was assuming that HttpStatus = 200 meant the call was executed properly and if not the call failed.

    But for some reason this is not the case!

    Please read the details below:

    Setup 1:

    When executing the DeleteAllCustomers call with a current UTC+2 based unix timestamp the following is returned:

    Even though the return code is OK, the customers were not deleted.

    Setup 2:

    When executing the DeleteAllCustomers call with a current UTC based unix timestamp the following is returned:

    • StatusCode = 401 - Unauthorized
    • StatusDescription = Authorization Required
    • Content => Normal Login screen, check here: http://pastie.org/2244813

    Even though this seems to mean that there was an error and the call could not be executed. All customers were deleted now!

    Any idea why this happens and is this expected behavior?

  2. Support Staff 2 Posted by Marc Guyer on 22 Jul, 2011 01:08 PM

    Marc Guyer's Avatar

    Setup 1:

    Looks like we missed a few things there. This should now behave properly.

    Setup 2:

    That behavior was a result of the bug in (1) above. This should now be repaired as well.

    Thanks very much for being diligent about this call and for reporting the issues.

  3. Marc Guyer closed this discussion on 22 Jul, 2011 01:08 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM