In my bigcommerce dashboard, there is this date: 22nd Mar 2015 for order id 172, but while fetching from API I get this date: Sat, 21 Mar 2015 17:42:01 +0000 for the same order id 172.
I want to get the same order date from API request as this is appearing on my bigcommerce dashboard.
This is a timezone issue, how can we solve this problem by using PHP?
Anyone with the bigcommerce logic there?
@Jon Skeet: Thanks! I found the solution for this issue.
I just added following line at the top of my script. date_default_timezone_set('Australia/Darwin');
Here, Australia/Darwin is from my bigcommerce dashboard (Date Settings).
But i have set this statically, i tried API request to get default timezone for my store on bogcommerce using: $ping = Bigcommerce::getTime();
It just get the result like:
DateTime Object ( [date] => 2015-03-23 08:52:48.000000 [timezone_type] => 1 [timezone] => +00:00 )
I want to get the timezone from bigcommerce store dynamically. If anybody have an idea about this??
Thanks!