# Offset during daylight saving time

**URL:** <https://community.postman.com/t/offset-during-daylight-saving-time/54045>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [October 29, 2023, 12:48pm UTC](https://community.postman.com/t/offset-during-daylight-saving-time/54045 "2023-10-29T12:48:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dds-cto](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dds-cto](https://community.postman.com/u/dds-cto)\
**Post date:** [October 29, 2023, 12:48pm UTC](https://community.postman.com/t/offset-during-daylight-saving-time/54045/1 "2023-10-29T12:48:48Z")

</div>

Is it possible to automatically adjust the OFFSET to account for daylight saving time changes in a query (or maybe in some parameter)? For example:

In my case, during daylight saving time, the OFFSET is +03:00:  
{{baseUrl}}/odata/API\_AlarmEventLogs?$filter=dateTime gt 2023-10-20T12:10:11.11%2B03:00

And during standard time, the OFFSET should be +02:00:  
{{baseUrl}}/odata/API\_AlarmEventLogs?$filter=dateTime gt 2023-10-20T12:10:11.11%2B02:00

I don’t want to manually change the OFFSET on my query (on the query’s filter) from +03:00 to +02:00 each time and vice versa…

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [October 29, 2023, 4:02pm UTC](https://community.postman.com/t/offset-during-daylight-saving-time/54045/2 "2023-10-29T16:02:07Z")

</div>

Postman uses JavaScript under the hood.

Have a look at the accepted answer for the following on Stack Overflow.

> <https://stackoverflow.com/questions/11887934/how-to-check-if-dst-daylight-saving-time-is-in-effect-and-if-so-the-offset>

Change the offset to a variable, and you could incorporate the accepted answer in an pre-request script to update the offset accordingly.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [November 28, 2023, 4:02pm UTC](https://community.postman.com/t/offset-during-daylight-saving-time/54045/3 "2023-11-28T16:02:37Z")

</div>

Closed on November 28, 2023, 4:02pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
