Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Client::getTime() #299

Merged
merged 3 commits into from
Jun 28, 2024
Merged

Fix Client::getTime() #299

merged 3 commits into from
Jun 28, 2024

Conversation

TomA-R
Copy link
Member

@TomA-R TomA-R commented Jun 13, 2024

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"
}

@TomA-R TomA-R requested a review from a team June 14, 2024 08:59
@TomA-R TomA-R merged commit 21d51c9 into master Jun 28, 2024
8 checks passed
@TomA-R TomA-R deleted the fix_client_gettime branch June 28, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bigcommerce::getTime() doesn't validate store credentials and returns garbage
2 participants