Localization of date wrong on TV Guide (1 Viewer)

NealG

New Member
January 7, 2009
2
0
Home Country
United States of America United States of America
I am running MP 1.0.2, std. Blue3 skin on WinXP Pro English and my language settings are English (United States) in Control Panel. However, when I open the TV Guide, it shows the spincontrol date for today as "Thu 3-9" as opposed to "Thu 9-3" (which is how it is traditionally dispayed in the US). Is this a known issue? Should I submit a bug report? If someone points me in the right direction (i.e., what source file controls this), I'd be happy to work on a patch myself..

Thanks in advance for any assistance you can provide.
 

NealG

New Member
January 7, 2009
2
0
Home Country
United States of America United States of America
Ok. it took me a while to find the TVGuide code (I was looking in the MediaPortal trunk when it was really in the TVEngine3 trunk - I think I need a roadmap;) ). I found the offending code in TvGuideBase.cs in the TVEngine3\TVLibrary\TvPlugin solution. The day spincontrol value, in the TV Guide, is hard-coded and does not respect the culture's date format.

I will create a patch on the assumption that it is acceptable to base the day vs. month order on the ShortDateFormat of the current culture.
 

Mashenden

Portal Pro
January 13, 2006
113
3
Richmond, VA
Home Country
United States of America United States of America
I will create a patch on the assumption that it is acceptable to base the day vs. month order on the ShortDateFormat of the current culture.

Did a solution to this ever materialize?

Bump...

Why is this issue being ignored? Is this a EU/US rub or something that is incredibly difficult to resolve? I doubt the latter.

Please comment. It is tarnishing (WAF) an otherwise awesome program.
 

Mashenden

Portal Pro
January 13, 2006
113
3
Richmond, VA
Home Country
United States of America United States of America

ewestcot

New Member
February 28, 2011
1
0
Home Country
United States of America United States of America
I am new to MP, but am installing it and configuring it. I am a .Net programmer, and I will look at the code and see if I can fix it. The best fix would be to have it automatically recognize the "culture" for the current PC and use that to determine the proper date format in the spin control for the TV Guide.

If I can not have it automatically adjust the date format, then I will look into hard-coding the US format and submitting it as some kind of plugin, or something.

Again, I am new to MP, so I am not sure how to submit code changes (I am not an open-source developer, yet). So, I will have to read all of the rules and guidelines to get the fix submitted.

I will update this thread (hopefully by 3/6/11) when this is done. I expect to have the code change done in the next day or two; but, submitting it may take longer.
 

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    The only plausible reason for this being ignored, would be that it probably would have gotten more attention in the submit-a-bug-and-well-look-into-it thread at
    MediaPortal 1.2.0 ALPHA - MediaPortal Forum

    Anyways, it sounds like it could use improvement - I wouldn't categorize it as a real bug, but more of an overlooked issue.

    I'm sure you will find plenty of examples in the code on how to properly format time and dates with localized values - and a fix would be dearly valued!

    ewestcot: All user can submit patches in Submit: code patches (MediaPortal/TV-Server/etc.) - MediaPortal Forum and my experience is that a well-documented patch is almost all the time accepted or at least evaluated.

    Just make sure to describe the issue the patch fixes - most people forget this - and it has a high influence in the number of people willing to look at it.

    And to all... :D & :sorry:
     

    #Coder

    Portal Member
    September 8, 2009
    5
    1
    Pittsford, NY
    Home Country
    United States of America United States of America
    For what it's worth, I submitted a patch (see https://forum.team-mediaportal.com/...v-radio-guide-localize-day-spincontrol-70256/), a long time ago, to correct this in RadioGuideBase & TvGuideBase. Unfortunately, the patch was rejected because of duplicate code in these modules. I agree that duplicating code is bad, there is already a ton of duplication between these modules. At first, I had grandiose plans of making a generic class for getting localized dates; but, I just didn't have more time to devote to it.

    I use ForTheRecord for scheduling which replaces the MP guide anyway. I submitted the patch to the FTR developers. They were grateful for the patch and accepted it as is. After that, I forgot about the MP patch because it was fixed for me.

    You're welcome to use the patch I submitted as a starting point if you think it would be helpful. I just looked at it again and it wouldn't take much effort to eliminate the duplicate code.

    Good luck..

    Neal
     

    Users who are viewing this thread

    Top Bottom