# Extract day, month and year from a date field. Changing Timezone

**URL:** <https://discuss.elastic.co/t/extract-day-month-and-year-from-a-date-field-changing-timezone/267646>\
**Category:** Logstash\
**Created:** [March 18, 2021, 11:38am UTC](https://discuss.elastic.co/t/extract-day-month-and-year-from-a-date-field-changing-timezone/267646 "2021-03-18T11:38:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 18, 2021, 5:27pm UTC](https://discuss.elastic.co/t/extract-day-month-and-year-from-a-date-field-changing-timezone/267646/2 "2021-03-18T17:27:44Z")

</div>

logstash and elasticsearch always store timestamps as UTC. sprintf references will always be in UTC. If you want the sprintf references to be in another timezone you will have to lie to logstash about what timezone [@timestamp] is in. (And note that sprintf references use [@timestamp], not whatever field the date filter is using.)

---

_[View the full topic](https://discuss.elastic.co/t/extract-day-month-and-year-from-a-date-field-changing-timezone/267646)._
