Jump to content

False date time conversion for series schedules


pünktchen
Go to solution Solved by Luke,

Recommended Posts

pünktchen

I think i've seen this before, but it's a case that happens not often...

On the series schedules screen the day of the date time (because of this, the checkmarks for days also) is presented in UTC instead of local time.

It was the right conversion while creating the series schedule and it is always right for one time schedules.

Some pictures to add clarity:

 

5750ace171bfd_guide.png

 

5750ad11caf21_friends.png

 

5750ad2f2a3de_izombie.png

 

5750ad4fc9f74_upcoming.png

 

5750ad916ca2b_series.png

Link to comment
Share on other sites

i don't know, check your system time zone settings and/or the dates coming from the tv plugin. ensure that they're not only in utc but also marked as utc, equally important.

Link to comment
Share on other sites

pünktchen

My system timezone is correct. Also the times in Emby are correct when comes to guide and one time schedules.

It's only series schedules where no time conversion takes place! (The plugin code for single and series schedules is the same)

Please take look at the next two screenshots:

The first one shows a child timer of the problematic series schedule. The api returns UTC time and the webinterface shows the correct local time.

The second screenshot shows the series schedule itself. The api returns UTC time and the webinterface also. No time conversion takes place! But it should be friday instead of thursday, because i'm UTC +2h.

 

57585cbc42aca_timer.png

 

57585ce5f403f_series.png

Link to comment
Share on other sites

  • 4 weeks later...

looking at the api output is too late in the chain. make sure that not only is the provider returning utc, but that they're flagged as utc, equally important. then check your system time zone settings.

Link to comment
Share on other sites

pünktchen

looking at the api output is too late in the chain. make sure that not only is the provider returning utc, but that they're flagged as utc, equally important. then check your system time zone settings.

 

What do you mean by "flagged as utc"?

I deliver all dates (guide and schedules) in the MediaPortal plugin as utc to Emby.

Emby then shows all the dates and times correctly in my timezone everywhere! except for the series schedules!!!

Link to comment
Share on other sites

pünktchen

Somelike this:

seriesTimerInfo.StartDate = DateTime.SpecifyKind(schedule.StartTime, DateTimeKind.Utc)

doesn't make any difference.

The time part of the DateTime for series schedules is also correct in Emby.

It's just the day of the week of the DateTime that is not right!

Link to comment
Share on other sites

pünktchen

In "GetSeriesTimersAsync" i could do this to representate the day of the week:

seriesTimerInfo.Days.Add(schedule.StartTime.ToLocalTime().DayOfWeek)

This works, but shouldn't Emby do all of the time conversions?!

Link to comment
Share on other sites

  • Solution

I'll have to check what emby TV does. It might just be that we did it that way and it's too late to change it now.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...