bhushankummar / amazon-mws

Amazon MWS NodeJS Wrapper
MIT License
197 stars 78 forks source link

listorders with another timezone #85

Closed lincolnaleixo closed 5 years ago

lincolnaleixo commented 5 years ago

Hi there,

Is it possible to request a list orders using the Amazon timezone (PDT)? I know the request is made using UTC and I know I can convert it but it will save time and resources if I could request directly in PDT. I was able to do this using the Amazon PHP API but couldn't using your API.

Here's what I tried:

amazonMws.orders.search({
            'Version': '2013-09-01',
            'Action': 'ListOrders',
            'SellerId': 'XXXXXXXXXXXXXX',
            'MWSAuthToken': 'MWS_AUTH_TOKEN',
            'MarketplaceId.Id.1': 'ATVPDKIKX0DER',
            'CreatedAfter': new Date('2019-04-02T16:00:21.784PDT'),
        });
egdavid commented 5 years ago

'CreatedAfter': '2019-04-02T16:00:21.784PDT', should work. Does it?

lincolnaleixo commented 5 years ago

@roasted-toast have you tried it? because with me I got MalformedInput

egdavid commented 5 years ago

@robot110011 You should probably try removing the milliseconds.

lincolnaleixo commented 5 years ago

I also tried removing the ms, it seems I really need to request in UTC :(. Calculating yesterday orders for example is a mess...