Displaying local time

What is the best way to display time-series in local (browser) time zone?

If I am sending data with time zone - it is always converted to UTC.

Without time zone it is displayed as is…

(The only option I though of is converting the time on server and sending it without time zone - but proper solution is always to use browser time zone somehow)

Thanks

Hi,

The best option is probably a FuncTickFormatter or Custom extension formatter that has a little JS code to format the ticks according to your needs.

Thanks,

Bryan

···

On Apr 12, 2018, at 10:52, Meir Tseitlin <[email protected]> wrote:

What is the best way to display time-series in local (browser) time zone?

If I am sending data with time zone - it is always converted to UTC.
Without time zone it is displayed as is....

(The only option I though of is converting the time on server and sending it without time zone - but proper solution is always to use browser time zone somehow)

Thanks

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e60ae28d-a9b9-41fc-b49a-d726e89cd9cd%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Thanks Bryan,

The following works fine:

fig.xaxis.formatter = FuncTickFormatter(code = """

    date = new Date(tick);
    return date.toLocaleDateString('en-EN', {
      hour: '2-digit',
      minute: '2-digit',
      hour12: false,
      month: 'short',
      day: 'numeric'
    }).replace(',', '');
""")

···

On Thursday, April 12, 2018 at 6:57:01 PM UTC+3, Bryan Van de ven wrote:

Hi,

The best option is probably a FuncTickFormatter or Custom extension formatter that has a little JS code to format the ticks according to your needs.

Thanks,

Bryan

On Apr 12, 2018, at 10:52, Meir Tseitlin [email protected] wrote:

What is the best way to display time-series in local (browser) time zone?

If I am sending data with time zone - it is always converted to UTC.

Without time zone it is displayed as is…

(The only option I though of is converting the time on server and sending it without time zone - but proper solution is always to use browser time zone somehow)

Thanks


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e60ae28d-a9b9-41fc-b49a-d726e89cd9cd%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.