itmeJP Community


itmeJP Community

Schedule "Starts in X Hours" Wrong Calulation

I’m in the Eastern US timezone and Court of Swords today starts at 4pm here. The schedule says this is in “2 hours”, but it’s 10:30 am. This is wrong.

1 Like

you changed the drop down menu in the bottom right to Eastern right?

1 Like

I had similar issue just now. First time i loaded the site it was saying Court of sword starting in 1 hours in the “Up Next” panel… With US Eastern Selected. Then i change the selection to something else and now it’s saying in 5 hours.

2 Likes

The “starts in” calculation uses whatever time zone you selected for the calculation, which in my opinion is a bad way of doing it. “Starts in” should always be a correct value no matter what time zone you choose, and should always use the server’s time zone (or whatever time zone the show start dates are entered in) for calculation.

3 Likes

That makes sense. I’ll forward it to the developer.

2 Likes

Related to that, it claims Dropped Frames starts in 13 hours [UTC for all that matters], which also seems to indicate the actual date doesn’t shift over?

Also: Clicking on it says 26th 9 PM when in PST, 26th 12 AM in EST, 26th 4 AM in UTC and 26th 5 AM for CET - So the time seems to calculate correctly (not sure if it’s actually correct), but the date is fixed?

Another minor point for the Schedule-guy (if not already considered), Europe is going to switch off DST this Sunday, so there is a minor difference for… a week?

2 Likes

It should auto correct. At least that’s what I’ve been told. And also fuck my sleeping schedule…

I’ve forwarded this to the developer earlier, no updates on the progress yet.

Actually I’ll link the developer to this topic and he can ask questions or just look at it. I’ll stay in communication with you in any case. I want these issues resolved as much as you do. :itmejpbro:

1 Like

Yes. The schedule shows the right time but not the “starts in”

1 Like

that odd. Sorry I have no idea how to fix that. :itmejps:

1 Like

not sure, but when i go into the schedule and click on the dropped frames event for later today, it says:

Stream starts:
started: 15 hours ago

Funny enough, this coincides with the time that the stream last started, last night at 9pm est - about 15 hours ago.
I also noticed last night that it did a similar thing, where it showed that a show that was supposed to start later “started X hours ago”, but when JP went live ( or close to that time) it changed to started 1 min ago.

not quite sure what would be doing that, though I suppose the dat&time for events are somehow being affected by previous event variables? :confused:

2 Likes

Most languages (and frame works) have one or more date libraries that extends and simplifies working with dates, some of these also have methods that prints/returns a text string at show the difference between two date times.
Ex:

  • Moment.js is a javascript library where you can do: moment(“2016-10-26 23:15”, “YYYY-MM-DD HH:mm”).fromNow(); will output: in 2 hours and 6 minutes (or something close to that, haven’t testet it).
  • Carbon is a PHP class with a diffForHumans() method that does the same thing as .fromNow()
1 Like

That might just have been me messing things up. Just noticed that I had put it as 00:00 and not 17:00 EDT in the post type. Hopefully that’s fixed now.

This I don’t know why it happened but I’ve seen reports that it goes away from the Upcoming/Next a bit too quick.

well, it seems to be working now anyway.

oh, and by the way, great job so far on the site. Love it! :itmejpheart:

2 Likes

Thanks for the bug reports guys. Just pushed an update to the site with many timezone related fixes.

@Utherix @JavarisLamarJavarison was correct. Up next time should be calculated correctly now. If it isn’t please let us know.

@StillAnotherOne Thanks! Just fixed this. Dates now shift over. Summer to winter time should be automatic but we’ll see.

@AzraRillian I have no idea what could be causing that but I just changed a bunch so perhaps it’s fixed now. Please let us know if it happens again.

@crowly_ We’re actually using moment.js for the remaining time :smile: and PHP’s DateTime object for the rest.

3 Likes

Time remaining for Dropped Frames is wrong for today. Dropped Frames starts at 5pm Eastern but the Schedule says it started 13 minutes ago (it is 1:13pm Eastern).

Edit: It seems if I switch it to a different time zone and back to Eastern it fixes the problem… odd.

Haven’t check, but it could be that your previously selected timezone is either stored in a cookie or the browser’s web storage so it starts with an “old” and now wrong value. When you select a new timezone, new values are used etc

Please report back if you have time to check it out.
@Twistedgerm glad it fixed itself. Hopefully it’s what @crowly_ said and that it’s an old bug that now have been fixed.

Thank you both for reporting in.

It uses a cookie that stores the timezone as ex Europe/Amsterdam and that should map correctly to summer/daylight saving (CEST) or standard time (CET). So my previous hypothesis seems be correct.

1 Like