<div dir="ltr">So should I put in an RFE for user selectable time zone?<div><br></div><div>Logan<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 28, 2017 at 3:24 PM, Scott Dickerson <span dir="ltr"><<a href="mailto:sdickers@redhat.com" target="_blank">sdickers@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sat, Jan 28, 2017 at 12:06 AM, Oved Ourfali <span dir="ltr"><<a href="mailto:oourfali@redhat.com" target="_blank">oourfali@redhat.com</a>></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></span><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 'undefined' and equates to the "runtime's default time zone". Second is 'UTC'. Since the first option is ambiguous and we don't know what it is unless we parse a formatted string, using a default of 'UTC' 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't cover the TZ problem very well.<br><br></div><div>There is another solution - re-implement dashboard'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's JS with locales (min-gz @ 67.9k) and timezones (min-gz @ 9.9k or 25.6k). Wouldn'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't require much TZ support for Intl.DateFormat. Because browsers don'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" target="_blank">https://developer.mozilla.org/<wbr>en-US/docs/Web/JavaScript/<wbr>Reference/Global_Objects/<wbr>DateTimeFormat</a><br>[2] - <a href="https://github.com/andyearnshaw/Intl.js" target="_blank">https://github.com/<wbr>andyearnshaw/Intl.js</a><br></div><div>[3] - <a href="https://github.com/andyearnshaw/Intl.js/blob/master/src/12.datetimeformat.js#L186" target="_blank">https://github.com/<wbr>andyearnshaw/Intl.js/blob/<wbr>master/src/12.datetimeformat.<wbr>js#L186</a><br>[4] - <a href="http://momentjs.com/" target="_blank">http://momentjs.com/</a><br>[5] - <a href="http://momentjs.com/timezone/" target="_blank">http://momentjs.com/timezone/</a><br><br><br></div><div>Regards,<br></div><div>Scott<br></div><span class=""><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="m_4557111078724227984gmail-h5">On Jan 27, 2017 19:01, "Logan Kuhn" <<a href="mailto:support@jac-properties.com" target="_blank">support@jac-properties.com</a>> 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="m_4557111078724227984gmail-h5"><div dir="ltr">Is there a way to change the timezone for the dashboard plugin?<div><br></div><div>I've searched the list and the plugin files and can't seem to find where it'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></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_4557111078724227984gmail_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>
</font></span></div></div>
</blockquote></div><br></div></div></div>