community-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher <ctubb...@apache.org>
Subject Re: reporter.apache.org off-by-one
Date Thu, 08 Sep 2016 21:01:53 GMT
On Thu, Sep 8, 2016 at 4:54 PM sebb <sebbaz@gmail.com> wrote:

> On 8 September 2016 at 17:18, sebb <sebbaz@gmail.com> wrote:
> > On 8 September 2016 at 01:59, Christopher <ctubbsii@apache.org> wrote:
> >> On Wed, Sep 7, 2016 at 8:51 PM Lefty Leverenz <leftyleverenz@gmail.com>
> >> wrote:
> >>
> >>> Is this a timezone problem?
>
> Yes.
>
> >>>
> >>>
> >> Possibly. I tried changing my JIRA timezone to UTC+0, just in case, but
> it
> >> had no effect. I don't think JIRA stores the timezone with these dates,
> so
> >> it might be assumed to be midnight when reporter translates it to
> whatever
> >> it considers local time. If the local time reporter is translating it
> to is
> >> east of UTC+0, then that would make sense. It should probably parse the
> >> JIRA dates as UTC+0, and then display them as UTC+0, since there's no
> way
> >> for it to know the intended time zone from JIRA if JIRA isn't storing
> that
> >> (even if it does store it, the UI doesn't allow you to specify, so it's
> >> going to default to midnight).
> >>
> >
> > JIRA stores the dates as YYYY-MM-DD; no time at all. Or at least that
> > is the data that reporter.a.o sees.
> >
> > This is converted to seconds since the epoch, and assumes local time.
> > I think the TZ is UTC on reporter.a.o.
> >
> > The epoch time must be converted back again for display.
> > I suspect this is where the issue lies (given that r.a.o uses UTC)
> >
> > I see the following Accumulo dates:
> >
> > - 1.8.0: Tue Sep 06 2016
> > - 1.7.2: Wed Jun 22 2016
> > - 1.7.1: Fri Feb 26 2016
> >
> > which agree (for me) with the JIRA dates.
>
> However if I change my local timezone to EDT I see dates one day earlier.
>
> > I assume you are seeing one day earlier for each of those?
> > What is your local timezone?
> >
> > In which case it's just a case of finding where the epoch time is
> > converted for display and ensuring that UTC is used.
> >
>
> The dates are displayed using Javascript Date.toDateString() which
> uses the local timezone.
> I can fix that.
>
>
Awesome. That makes sense, because neither JIRA nor reporter handle time
input in the UI, so it makes sense to just display the date without the
timezone conversion in the browser. Thanks!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message