bigcommerce / bigcommerce-api-php

Connect PHP applications with the Bigcommerce Platform
https://developer.bigcommerce.com
MIT License
143 stars 186 forks source link

Fix Client::getTime() #299

Closed TomA-R closed 2 months ago

TomA-R commented 3 months ago

What/Why?

Fixes #298

Testing

Updated ::getTime() I've updated the unit test to reflect what's actually returned by the API. Also I've run the steps provided to reproduce this issue, verifying that it no longer happens:

php > var_dump(\Bigcommerce\Api\Client::getTime());
php shell code:1:
class DateTime#6 (3) {
  public $date =>
  string(26) "2024-06-13 13:43:56.124000"
  public $timezone_type =>
  int(1)
  public $timezone =>
  string(6) "+00:00"
}

Added ::getStoreTime()

php > var_dump(\Bigcommerce\Api\Client::getStoreTime());
php shell code:1:
class DateTime#7 (3) {
  public $date =>
  string(26) "2024-06-14 09:01:35.000000"
  public $timezone_type =>
  int(1)
  public $timezone =>
  string(6) "+00:00"
}