Skip to content

Commit 5eff96c

Browse files
committed
add hint about UTC timezone
1 parent 3796761 commit 5eff96c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,18 +322,22 @@ Supported date parameters are:
322322
* `updated_at_gt`
323323
* `updated_at_lt`
324324

325+
Ensure that the dates used have to be in UTC timezone.
326+
325327
```php
326328
use Storyblok\Api\StoriesApi;
327329
use Storyblok\Api\StoryblokClient;
328330
use Storyblok\Api\Domain\Value\QueryParameter\PublishedAtGt;
329331
use Storyblok\Api\Request\StoriesRequest;
330332

333+
$dateTime = new \DateTimeImmutable('1969-12-28 12:12:12.425', new \DateTimeZone('UTC'));
334+
331335
$client = new StoryblokClient(/* ... */);
332336

333337
$storiesApi = new StoriesApi($client);
334338
$response = $storiesApi->all(new StoriesRequest(
335339
language: 'de',
336-
publishedAtGt: new PublishedAtGt($date)
340+
publishedAtGt: new PublishedAtGt($dateTime)
337341
));
338342
```
339343

0 commit comments

Comments
 (0)