# aggregateWindow and managing queries in local time

**URL:** https://community.influxdata.com/t/aggregatewindow-and-managing-queries-in-local-time/31848
**Category:** Fluxlang
**Tags:** time, timestamp
**Created:** [October 16, 2023, 11:49pm UTC](https://community.influxdata.com/t/aggregatewindow-and-managing-queries-in-local-time/31848 "2023-10-16T23:49:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Timmwardion](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/timmwardion/32/14372_2.png) [@Timmwardion](https://community.influxdata.com/u/Timmwardion)
#### Post date: [October 16, 2023, 11:49pm UTC](https://community.influxdata.com/t/aggregatewindow-and-managing-queries-in-local-time/31848/1 "2023-10-16T23:49:03Z")

</div>

Hi All.

I’m trying to work with data in local time (Australia/Melbourne, or AEST we are currently in daylight savings).

I have some sensors that are writing data to influx in batches but those batches contain a timestamp in UTC. (Influx will reject the insert if UTC is not set properly).

I also have a time column writing data in local time.

I’d like to use aggregateWindow() to summarise some things - but my understanding is that it will use the default \_time column.

how can I get aggregateWindow using a specified time column OR how can I adjust the \_time column (default) to be in my local timezone?

I’ve set option.location as per below but it doesn’t seem to impact \_time.

option location = timezone.location(name: “Australia/Melbourne”)

---

<div class="post-metadata">

### Author: ![Timmwardion](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/timmwardion/32/14372_2.png) [@Timmwardion](https://community.influxdata.com/u/Timmwardion)
#### Post date: [October 17, 2023, 12:04am UTC](https://community.influxdata.com/t/aggregatewindow-and-managing-queries-in-local-time/31848/2 "2023-10-17T00:04:34Z")

</div>

I should add that I’m aware of the timeshift() function, which works well, but I need to be able to dynamically adjust according to the local time, which means catering for different timezones and various DST changes fairly seamlessly.

---

<div class="post-metadata">

### Author: ![William\_Leo](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/william_leo/32/17277_2.png) [@William\_Leo](https://community.influxdata.com/u/William_Leo)
#### Post date: [July 24, 2025, 11:05am UTC](https://community.influxdata.com/t/aggregatewindow-and-managing-queries-in-local-time/31848/3 "2025-07-24T11:05:03Z")

</div>

`aggregateWindow()` always uses `_time` (UTC). You can’t change that, but you can set `option location` for display and add a `local_time` column using `map()` for reference.
