# Date in runtime fields

**URL:** <https://discuss.elastic.co/t/date-in-runtime-fields/274692>\
**Category:** Elasticsearch\
**Tags:** runtime-fields\
**Created:** [June 2, 2021, 1:16am UTC](https://discuss.elastic.co/t/date-in-runtime-fields/274692 "2021-06-02T01:16:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![IGB042](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@IGB042](https://discuss.elastic.co/u/IGB042)\
**Post date:** [June 2, 2021, 1:16am UTC](https://discuss.elastic.co/t/date-in-runtime-fields/274692/1 "2021-06-02T01:16:34Z")

</div>

I currently have an issue with calculating the day of week in a runtime field.

My time field is stored in UTC  
"isotimestamp": ["2021-06-01T23:55:38.726Z"]  
and displays correctly according to my TZ (UTC+10)  
isotimestamp Jun 2, 2021 @ 09:55:38.726

However, my runtime field calculates from the UTC time

`emit(doc['isotimestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))`

dayofweek Tuesday

How do I get ['isotimestamp'] to return in the appropriate TZ instead of UTC?

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 30, 2021, 1:16am UTC](https://discuss.elastic.co/t/date-in-runtime-fields/274692/2 "2021-06-30T01:16:41Z")

</div>

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