Open trss opened 6 years ago
@trss thanks for reporting this. I can take a look in a few days and try to get this resolved!
@trss would you want the timestamp to be explicitly passed in (and fall back to Date.now()
if not passed in)?
Let me know what you think would work best for you. For backwards compatibility, I think allowing a user to optionally pass in a timestamp works, but let me know if you think there is a more ideal solution!
EDIT: actually that may not ideal because that seemingly would require the user of this package to perform the .toISOString()
operation themselves.
🤔 how exactly are you grabbing options.params.Timestamp
right now? I don't immediately see in the code how that is being exposed
Quoting from http://docs.developer.amazonservices.com/en_US/dev_guide/DG_ResponseFormat.html:
This timestamp is quietly set at https://github.com/bent0b0x/amazon-mws/blob/master/amazon.js#L15 and so I'm currently storing
options.params.Timestamp
immediately after making the call but this appears fragile. So the timestamp could be made explicitly available or this method of storing it could be documented.EDIT: Line number update in latest code: https://github.com/bent0b0x/amazon-mws/blob/master/amazon.js#L26