# How to modify date/time in timelion canvas workpad?

**URL:** <https://discuss.elastic.co/t/how-to-modify-date-time-in-timelion-canvas-workpad/251975>\
**Category:** Kibana\
**Tags:** canvas, timelion\
**Created:** [October 14, 2020, 12:46am UTC](https://discuss.elastic.co/t/how-to-modify-date-time-in-timelion-canvas-workpad/251975 "2020-10-14T00:46:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 14, 2020, 12:46am UTC](https://discuss.elastic.co/t/how-to-modify-date-time-in-timelion-canvas-workpad/251975/1 "2020-10-14T00:46:33Z")

</div>

Hello  
Due to a bug in canvas workpads, date/time are showing in UTC.  
There is a workaround for ESQL.  
More details - [Wrong Canvas timezone](https://discuss.elastic.co/t/wrong-canvas-timezone/190221)

Is there a workaround for timelion visualisations?  
How can I show the current TZ in timelion x-axis?

Cheers!

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [October 14, 2020, 9:48am UTC](https://discuss.elastic.co/t/how-to-modify-date-time-in-timelion-canvas-workpad/251975/2 "2020-10-14T09:48:50Z")

</div>

Hi @AClerk  
if you use the timelion syntax in canvas, the visualization still use the same Canvas rendering library and will have the same timezone error, unfortunately.

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 14, 2020, 10:23pm UTC](https://discuss.elastic.co/t/how-to-modify-date-time-in-timelion-canvas-workpad/251975/3 "2020-10-14T22:23:43Z")

</div>

@markov00  
Thanks for your attention.  
In other visualisations, I could use the following workaround:

```auto
select (my_timestamp + INTERVAL 10 HOURS) as my_date....

```

And by that, I could work around the bug, and show the correct time, by timezone.  
Is it possible to use the same logic with timelion?  
Something like (pseudo-code):

```auto
timelion 
  query=...
...
| mapColumn "my_timestamp" fn={my_timestamp = timestamp + 10}
| pointseries x="my_timestamp" y="mean(value)"
...
...
| render

```

Hopefully to use the newly mapped my\_timestamp with the x-axis, and show the correct time, by timezone.

Cheers!

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [October 15, 2020, 7:33am UTC](https://discuss.elastic.co/t/how-to-modify-date-time-in-timelion-canvas-workpad/251975/4 "2020-10-15T07:33:41Z")

</div>

this could work, you can probably use the `offset` option in the `.es()` function to offset by 10 hours your dataset

> <https://github.com/elastic/timelion/blob/master/FUNCTIONS.md#es>

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [October 15, 2020, 10:04pm UTC](https://discuss.elastic.co/t/how-to-modify-date-time-in-timelion-canvas-workpad/251975/5 "2020-10-15T22:04:59Z")

</div>

> [@markov00](#):
>
> `Eg -1M to make events from one month ago appear as if they are happening now `

@markov00  
That is not the functionality I want.  
I need events from NOW appear as they are happening now, and in current timezone.  
I can see that happening, just with UTC timezone, as mentioned earlier.

I need to find a way to shift the visual's display, not fetch old events.

Cheers!

---

<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:** [November 12, 2020, 10:05pm UTC](https://discuss.elastic.co/t/how-to-modify-date-time-in-timelion-canvas-workpad/251975/6 "2020-11-12T22:05:05Z")

</div>

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