<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 28, 2017 at 12:06 AM, Oved Ourfali <span dir="ltr">&lt;<a href="mailto:oourfali@redhat.com" target="_blank">oourfali@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">This is not possible at the moment. <br>
We had difficulties trying to get the one defined by the browser as well. <br>
As we go towards having all logs and audit to UTC in 4.2 the latest, for log aggregation purposes, we might not invest time in that as well. </p>
<p dir="ltr">However, perhaps it can be easy to set this up in the ui plug-in definition. It will require manually editing the file, but it is a valid workaround. </p>
<p dir="ltr">Scott / Vojtech, your thoughts? </p></blockquote><div><br>Dashboard relies on ECMA-402 Intl.DateFormat spec [1] or the Polyfill [2].  The spec says that implementations need to, at the very least, support 2 time zones.  First is &#39;undefined&#39; and equates to the &quot;runtime&#39;s default time zone&quot;.  Second is &#39;UTC&#39;.  Since the first option is ambiguous and we don&#39;t know what it is unless we parse a formatted string, using a default of &#39;UTC&#39; will provide the best cross-browser consistency.  Also, by forcing to a UTC TZ, everyone looking at times on dashboard, no matter where they are, will see the same times.<br><br></div><div>The Polyfill only supports the required 2 time zones.  See [3] for the gritty details of their implementation.<br><br></div><div>Additionally, each browser may or may not support named TZs at all for date formatting.  When I was trying to find a reasonable implementation to support time zone switching, there was little consistency across browsers (Firefox, Chrome, IE/Edge on Windows, Safari on Mac).  The Intl.DateFormat javascript support just doesn&#39;t cover the TZ problem very well.<br><br></div><div>There is another solution - re-implement dashboard&#39;s date formatting to use moment.js [4] and moment-timezone.js [5].  Doing so would let dashboard have a user selectable TZ, but would incur the cost of shipping moment&#39;s JS with locales (min-gz @ 67.9k) and timezones (min-gz @ 9.9k or 25.6k).  Wouldn&#39;t be difficult work.  It would just need to be given the green light.<br><br><br></div><div>TL;DR - Dashboard uses ECMA-402 and the spec doesn&#39;t require much TZ support for Intl.DateFormat.  Because browsers don&#39;t support formatting dates in different locales very well, UTC is used.  The safest way to support explicitly selected TZs right now is to swap the date formatting implementation out to one that uses momentjs.<br></div><div><br><br>[1] - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat</a><br>[2] - <a href="https://github.com/andyearnshaw/Intl.js">https://github.com/andyearnshaw/Intl.js</a><br></div><div>[3] - <a href="https://github.com/andyearnshaw/Intl.js/blob/master/src/12.datetimeformat.js#L186">https://github.com/andyearnshaw/Intl.js/blob/master/src/12.datetimeformat.js#L186</a><br>[4] - <a href="http://momentjs.com/">http://momentjs.com/</a><br>[5] - <a href="http://momentjs.com/timezone/">http://momentjs.com/timezone/</a><br><br><br></div><div>Regards,<br></div><div>Scott<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p dir="ltr">Thanks, <br>
Oved </p>
<div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-h5">On Jan 27, 2017 19:01, &quot;Logan Kuhn&quot; &lt;<a href="mailto:support@jac-properties.com" target="_blank">support@jac-properties.com</a>&gt; wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div dir="ltr">Is there a way to change the timezone for the dashboard plugin?<div><br></div><div>I&#39;ve searched the list and the plugin files and can&#39;t seem to find where it&#39;s set.<br><div><br></div><div>Logan</div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
<br></blockquote></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div>Scott Dickerson<br></div>Senior Software Engineer<br></div>RHEV-M Engineering - UX Team<br>Red Hat, Inc<br></div></div>
</div></div>