24-time Format in MP 0.2.1.0 (2 Viewers)

wlgspotter

Portal Pro
December 3, 2006
117
10
Auckland
Home Country
New Zealand New Zealand
Hi:

I'm a relatively newbie to MP, and am currently running 0.2.1.0. I'd like to have the tiem display on the MP screen to display is 24-hour time format as opposed to AM/PM? I have 24-hour set in Windows XP Control Panel --> Regional Settings, but my MP screen still display in AM/PM. I'm checked out configuration.exe --> plugins --> home, and could only find the date format but not time format.

Anyone has any ideas if it's possible to set the time display for 24-hour as opposed to AM/PM?

Thanks.
 

wlgspotter

Portal Pro
December 3, 2006
117
10
Auckland
Home Country
New Zealand New Zealand
Hi everyone:

It's been a while since I've posted this initial question, and MP has gone from 0.2.1 .0 to 0.2.3.0 RC3, however, I'm still seeing the problem in that I can't get MP to display in 24-hour time format, despite it being set in my windows --> Control Panel --> Regional Settings. I'm based in New Zealand and had the settings set to English (New Zealand).

I had a play with the settings and came to realise that if I set the Control Panel Regional Settings to one of the European languages (i.e. German or English UK) then MP will display in 24-hour time format.

Could this perhaps be some kind of bug that someone could look at?

Thanks.
 

infinite.loop

Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    does windows display the time correctly (24h) when you set "to English (New Zealand)" ?
    or does it display am/pm then? :)
     

    Mercbac

    Portal Pro
    March 20, 2007
    133
    5
    Home Country
    Sweden Sweden
    I have also faced this behaviour and found that MP seems to decide whether or not to use a 12-hour time format (with AM/PM) or a 24-hour format, based on the country or region defined in Windows, and not based on the Windows time format that's defined for the Windows system tray (=notification area) clock.
    Not sure if this is intentional, but to me it would be more intuitive to have MP use the same time format as the Windows clock, and not based on the country/region.
     

    wlgspotter

    Portal Pro
    December 3, 2006
    117
    10
    Auckland
    Home Country
    New Zealand New Zealand
    I have also faced this behaviour and found that MP seems to decide whether or not to use a 12-hour time format (with AM/PM) or a 24-hour format, based on the country or region defined in Windows, and not based on the Windows time format that's defined for the Windows system tray (=notification area) clock.
    Not sure if this is intentional, but to me it would be more intuitive to have MP use the same time format as the Windows clock, and not based on the country/region.

    Yes I think it seem so that way... I've tried to use English (Australia) and English (US) and MP uses AM/PM, but when I switch to Engish (UK) or even German MP uses 24-hour clock.

    And I second Mercbac's suggestion that I think it would be more intuitive for MP to use the same time format as the Window clock, or better still allow the user to customise it to their liking, much similar to how you can now customise the date format using the "Home" plugin.
     

    pbb

    Retired Team Member
  • Premium Supporter
  • October 30, 2006
    306
    24
    52
    Trondheim
    Home Country
    Norway Norway
    As a programmer, I am quite surprised about MP using it's own hard-coded list to decide whether to display 24- or 12-hour time, while Windows offers an easily obtainable, user-configurable and uniformly used date and time configuration.

    Is there something that MP is using, that doesn't make it as easy to retrieve that value?

    Anyway, I agree with above posters, MP ought to use Windows' regional settings preferences to show date and time. (This includes removing the date formatting from the Home plugin configuration.)
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    I changed the GetTime code in MediaPortal.cs to read the current user setting from the registry. On my PC, it now correctly handle the switch between am/pm or 24-hour format.

    By the way - this was still flagged as TODO in the code, so technically, it was not a bug :)

    I am not a MP developer and therefore cannot commit it to SVN. The changed file is attached. If one of the developers wants to look at it and commit to SVN.

    One thing - it is now also showing the seconds. The time is still only updated every minute. Should I remove the display of the seconds (I think so)?
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    OK, I have decided to just go ahead and remove the seconds.
    Time is now displayed according to user setting either HH:mm or hh:mm AM/PM.

    Source file attached. I only changed in the GetTime code block.

    Still begging DEVS to incorporate this enhancement in SVN.


    Off Topic:
    Also my other post, this time a with a bug-fix, without any reaction from DEVS: Slideshow bug
     

    Users who are viewing this thread

    Top Bottom