Seller Forums
Sign in
Sign in
user profile
Sign 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

110 views
2 replies
Tags:Shipping labels
00
Reply
0 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
There are no more posts to display
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

110 views
2 replies
Tags:Shipping labels
00
Reply
user profile

Date parameter - Timezone

by Seller_fil6CHvnRNUSY

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

Tags:Shipping labels
00
110 views
2 replies
Reply
0 replies
0 replies
Quick filters
Sort by
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
There are no more posts to display
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_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
Reply
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
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
Reply
There are no more posts to display

Similar Discussions

Similar Discussions

Go to original post