# Circle CI date is off by 5 hours in test

**URL:** <https://discuss.circleci.com/t/circle-ci-date-is-off-by-5-hours-in-test/23856>\
**Category:** Running Tests\
**Tags:** javascript\
**Created:** [July 25, 2018, 6:27pm UTC](https://discuss.circleci.com/t/circle-ci-date-is-off-by-5-hours-in-test/23856 "2018-07-25T18:27:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![milesalex](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@milesalex](https://discuss.circleci.com/u/milesalex)\
**Post date:** [July 25, 2018, 6:27pm UTC](https://discuss.circleci.com/t/circle-ci-date-is-off-by-5-hours-in-test/23856/1 "2018-07-25T18:27:01Z")

</div>

Unsure why my date is off by 5 hours, but works locally. What js code do I need to get the same results?

```
- Expected
+ Received

@@ -4,9 +4,9 @@
    "exchange": "bittrex",
    "fee_amount": 0.00008163,
    "fee_cur": "BTC",
    "sell_amount": 0.03265341,
    "sell_cur": "BTC",
- "trade_timestamp": 1513798073000,
+ "trade_timestamp": 1513780073000,
    "tradeid": "9c4e28e6-5a89-4ba2-adb7-98575b5d6ce0",
    "type": "trade",
  }
```

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [July 25, 2018, 7:19pm UTC](https://discuss.circleci.com/t/circle-ci-date-is-off-by-5-hours-in-test/23856/2 "2018-07-25T19:19:15Z")

</div>

What timezone are you in? What difference is there between your TZ and the TZ of the CircleCI servers? I would guess the servers are in UTC but you may wish to find out (get an SSH session and use the console). My guess is the TZ difference is 5 hours.

I suspect you have a bug that you need to fix, or your expected results were derived from running this code only in your timezone.

> [@milesalex](#):
>
> What js code do I need to get the same results

I think you are jumping too far ahead. You need to do some debugging first to see what the correct results are, given that your expected results might be wrong.

Then, show the code you do have, so people can see if there is something wrong with it, rather than asking them to code something from scratch. You may find a Stack Overflow question is more appropriate here anyway - there are more JS eyeballs over there.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [October 23, 2018, 7:19pm UTC](https://discuss.circleci.com/t/circle-ci-date-is-off-by-5-hours-in-test/23856/3 "2018-10-23T19:19:24Z")

</div>

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