Open drpritch opened 4 years ago
Thank you for creating the issue! One of our team members will get back to you shortly with additional information. If this is a product issue, please close this and contact the particular product's support instead (see https://support.microsoft.com/allproducts for the list of support websites).
@drpritch Please move this issue to https://github.com/MicrosoftDocs/azure-docs-sdk-node/issues
Describe the bug Azure Storage SDK for Javascript documentation assumes Javascript dates are measured in seconds and that 24 hours = 86400, but they are actually measured in milliseconds, so 24 hours would be 86400000. The examples therefore don't work.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Seen: st=2020-05-14T20%3A15%3A13Z&se=2020-05-14T20%3A16%3A40Z i.e., st = 2020-05-14 20:15:13 se = 2020-05-14 20:16:40
Expected: se = 2020-05-15 20:15:13
This is due to the input data, specifically the math in the expiresOn parameter. As shown: new Date().valueOf() + 86400
Should be: new Date().valueOf() + 86400000
I haven't scanned the documentation to see where else this is a problem, but it's probably pervasive.
Screenshots
Desktop (please complete the following information):
Additional context Add any other context about the problem here.