Date parameter - Timezone

Countries

Read only
Australia
Belgium
Brazil
Canada
Egypt
France
Germany
India
Italy
Japan
Mexico
Netherlands
Poland
Saudi Arabia
Singapore
Spain
Sweden
Turkey
United Arab Emirates
United Kingdom
United States
United States
imgSign in
user profile
Seller_fil6CHvnRNUSY

Date parameter - Timezone

Hello,

I need some help.

I’ve been using the the Finances API to pull data and up until now I was working with the default timezone (UTC)but now I need to pull data as if in PST.

Now, not all data has a Posted Date so I pull the data by the whole day (from 00:00 to 23:59:59.999 basically) and once I store the data in my database I label all the rows with the respective date.

However, since I need to label the data as if in PST I need to change the date/time parameters in the request.

At first I thought that using the timezone offset would be enough but I’m not so sure. Can anyone let me know how should I set the date ranges to pull data as if in PST?

So, I’m using, for example, in the PostedBefore parameter: 2018-01-15T00:00:00-08

Does this mean that it would query data as if it were 2018-01-14T16:00:00 UTC ?

Or would I need to add 8 hours to my date? like 2018-01-15T08:00:00

hope it’s not confusing,
thank you

122 views
2 replies
Tags:Shipping labels
00
Reply
2 replies
user profile
Seller_a8169BduAGvq6

The date format is ISO-8601 which includes time zone. All you have to do is format the date of your request accordingly.

00
user profile
Seller_uNUiyRYUdefW6

xx-xx-xxT00:00:00 (UTC) means it is midnight at the Royal Observatory in Greenwich and (-0800) = 4pm the previous day in California. When it is midnight in PST, it will be 8:00am in Greenwich. (UTC)

It is always earlier to the west, since the sun moves east to west.

Buildcom is correct, however, that it is best to use timezones (and libraries that properly support them) and avoid inevitable awkwardness with daylight savings, leap days, etc.

00
Follow this discussion to be notified of new activity

Similar Discussions

user profile
Seller_Aw5B1zxE8Q0ip
user profile
Seller_2YJAQcBBAPuVL
user profile
Seller_nAbLcnvnqPbX5