# Tomorrow's date evaluated differently in monitor

**URL:** <https://community.postman.com/t/tomorrows-date-evaluated-differently-in-monitor/36451>\
**Category:** Help Hub\
**Tags:** monitors\
**Created:** [June 22, 2022, 8:27am UTC](https://community.postman.com/t/tomorrows-date-evaluated-differently-in-monitor/36451 "2022-06-22T08:27:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tplooppostman](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tplooppostman](https://community.postman.com/u/tplooppostman)\
**Post date:** [June 22, 2022, 8:27am UTC](https://community.postman.com/t/tomorrows-date-evaluated-differently-in-monitor/36451/1 "2022-06-22T08:27:33Z")

</div>

Hi,

We have a monitor that runs every 30 minutes set to run in the “UK” region. One of the tests calls an endpoint with tomorrow’s date as a query string parameter, expecting it to fail, as tomorrow is invalid for this endpoint (it doesn’t have data after today). This test is failing between 00:00 and 01:00 local time (UK/BST). I suspect this is because the monitor is actually running on GMT/UTC time, not UK time. The test passes when I run it at that time in the collection.

When the monitor ran this morning at 00:00 and 00:30, the query parameter was evaluated to today’s date (22nd June):  
date=2022-06-22  
Only when it reached 01:00, the query parameter became  
date=2022-06-23

The endpoint being called does correctly evaluate tomorrow’s date at local time, i.e. at 00:00, the date for tomorrow fails to return data as expected (i.e. on 22nd at 00:00, calling with 23rd as input fails to return data, and similarly on 21st at 23:00, calling with 22nd as input fails to return data).

Here’s the code I’m using to generate the query parameter:

```auto
var moment = require('moment');
var now = moment();
now.add(1, 'days')
var tomorrowLocalDate = now.format('YYYY-MM-DD');
pm.environment.set('tomorrowLocalDate', tomorrowLocalDate)

```

Thank you

David
