Jump to content


Photo

Time change to 12h format (am/pm)


  • Please log in to reply
73 replies to this topic

Re: Time change to 12h format (am/pm) #41 el bandido

  • Senior Member
  • 360 posts

+13
Neutral

Posted 12 October 2020 - 15:25

You are leaving OpenPLI because you want to. Not because you have to. 12 Or 24 hour format works fine in North America. What little epg we have populates correctly with either time format.  Best of luck with your image change, and also best of luck with your address change. I have never found moving to be easy. 



Re: Time change to 12h format (am/pm) #42 deezee6

  • Senior Member
  • 49 posts

+1
Neutral

Posted 12 October 2020 - 17:42

el bandido, you are 100% wright, I'll try it in the US and see what happens ad I'll let you know.

Re: Time change to 12h format (am/pm) #43 ja5

  • Member
  • 6 posts

0
Neutral

Posted 14 October 2020 - 22:13

Over the last few days i have most things 12h on openatv now and found out it related to FuzzyDate.pyo and using strftime

changing '%d:%02d to strftime(config.usage.time.short.value, d) etc etc

 

I had a little try with openpli to but will try again later

 

some of the  pyo have %02d:%02d and does seem be everywhere. what is 24h

 

any ideas how to get am/pm from

 

t = localtime(int(epgList[x][1]))
tmp = "%01d:%02d" % (t.tm_hour, t.tm_min)


Edited by ja5, 14 October 2020 - 22:15.


Re: Time change to 12h format (am/pm) #44 deezee6

  • Senior Member
  • 49 posts

+1
Neutral

Posted 16 October 2020 - 10:41

Update:

 

On 12 October 2020 I posted: "For me this topic is closed. Flashed OpenVix, this time carefully set date to am/pm and it worked like charm! Regrettably have to leave Openpli".. but later I noticed that this works only with the original Vix skin. As far as you change to another skin everything goes back to 24h, no flexibility! So I am back to Openpli where my system time is correct (see image).In my modified skin, only EPG has to be fixed. This is a task for experienced programmers. Skin time settings are ease to change.
%H:%M is 24h
%I:%M%p is 12h, am/pm with leading zero, eg 07:10pm
%l:%M%p is 12h, am/pm without leading zero, eg 7:10pm
The last one is the norm for am/pm which you have in you phone or computer settings.

Attached Files

  • Attached File  Pix.zip   3.08MB   2 downloads


Re: Time change to 12h format (am/pm) #45 Dimitrij

  • PLi® Core member
  • 9,969 posts

+335
Excellent

Posted 16 October 2020 - 10:48

You can make a configurable option, 24/12 time format if everyone agrees.

GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: Time change to 12h format (am/pm) #46 deezee6

  • Senior Member
  • 49 posts

+1
Neutral

Posted 16 October 2020 - 10:49

%l:%M%p is 12h, am/pm without leading zero, eg 7:10pm is misspelled I has to be lower case L !



Re: Time change to 12h format (am/pm) #47 deezee6

  • Senior Member
  • 49 posts

+1
Neutral

Posted 16 October 2020 - 10:53

Dimitrij, be more specific, I don't understand what you mean?

Re: Time change to 12h format (am/pm) #48 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 16 October 2020 - 11:42

Better to use the translation stuff to do this.... when you set English for USA (feature need to be added) go for 12 h system... by translating the format strings to 12h system.... instead of ‘hacking’ it...:

Edited by littlesat, 16 October 2020 - 11:42.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Time change to 12h format (am/pm) #49 Dimitrij

  • PLi® Core member
  • 9,969 posts

+335
Excellent

Posted 16 October 2020 - 11:56

 

English for USA

 

The 12-hour format is prevalent in Australia, Canada (excluding Quebec), New Zealand, the United States and the Philippines. Together with the 24-hour format, it is used in the United Kingdom and some other English-speaking countries, Albania, Brazil, Greece, Ireland, Canadian Quebec and France


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: Time change to 12h format (am/pm) #50 deezee6

  • Senior Member
  • 49 posts

+1
Neutral

Posted 16 October 2020 - 12:37

It's getting too complicated. Pli is working on version 8, hope they will include this option like in all smartphones and computers. Vix has the English US, but it doesn't help a lot. I think most is defined by the skin and the skin I am using may have some codes, because nowhere in the skin you can find single EPG parameters, strange? Most of the enigma2 users don't need 12h option, but is not a bad idea to have some choice.  



Re: Time change to 12h format (am/pm) #51 mrvica

  • Senior Member
  • 1,218 posts

+80
Good

Posted 16 October 2020 - 12:46

you can change single EPG and multi EPG, look for the screens in your skin

<screen name="EPGSelection".......................

<screen name="EPGSelectionMulti"....................



Re: Time change to 12h format (am/pm) #52 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 16 October 2020 - 13:38

Or find another way to get these translated via the translation ‘system’...

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Time change to 12h format (am/pm) #53 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 16 October 2020 - 13:42

Why don't we use the locale data in the code, like any other system does, instead of hardcoding everything?

 

Then it is a matter of setting LC_TIME to en_US.utf8, and presto, problem solved. Making an option to set LC_TIME (when different from the locale selected) should not be to complex.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Time change to 12h format (am/pm) #54 deezee6

  • Senior Member
  • 49 posts

+1
Neutral

Posted 16 October 2020 - 13:55

In my skin I have only  <screen name="EPGSelection" position="0,0" size="1920,1080" title="SEPG election"                 1x 

thees parameters:        <screen name="EPGSelectionMulti" position="0,0" size="1920,1080" title="EPG Selection"          1x

                                       <screen name="EPGSearch" position="0,0" size="1920,1080" title="EPG Search"                        1x

                                       

all of them are set to:     <convert type="ClockToText">Format:%l:%M%p|</convert>  ,and than:   <convert type="ClockToText">Format:%A</convert>

                                                                              

 

That's all. What should change ?



Re: Time change to 12h format (am/pm) #55 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 16 October 2020 - 13:58

I think the problem is the values you are looking for aren't skinned, but are generated in code.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Time change to 12h format (am/pm) #56 deezee6

  • Senior Member
  • 49 posts

+1
Neutral

Posted 16 October 2020 - 14:06

Yes you are wright. But I don't know what values to put.

This is the only parameter I have in the skin:  <parameter name="GMultiEPGTimelineItemHeight" value="38" />



Re: Time change to 12h format (am/pm) #57 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 16 October 2020 - 14:21

I think it has been said a few times, to fix this you need to adapt the code.

 

And my suggestion is the adaption should be to remove the hardcoded formats everywhere (both in the skin and in the code), and use the LC_TIME format instead for both.

 

Which allows you to derive the date and time formats from the locale (which you select via the Language menu option), possibly with a menu option of override it (so you can have LC_ALL=it_IT.utf8, but LC_TIME=en_US.utf8, italian language but a US date and time format).


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Time change to 12h format (am/pm) #58 mrvica

  • Senior Member
  • 1,218 posts

+80
Good

Posted 16 October 2020 - 14:25

the date/time stamp you see in the single EPG selection is hard coded in event.cpp, you can´t even chage that "," to "/" between date and time without recompiling

https://github.com/O.../event.cpp#L247



Re: Time change to 12h format (am/pm) #59 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 16 October 2020 - 14:31

If the code would use LC_TIME, it will determine the format based on the locale set.

 

See https://lh.2xlibre.net/values/t_fmt/


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Time change to 12h format (am/pm) #60 deezee6

  • Senior Member
  • 49 posts

+1
Neutral

Posted 16 October 2020 - 15:57

First, I don't know how to adapt the code. I don't speak Italian... After English I speak German, some Russian and some other Slavic languages. All looks too complicated. Probably I have to give up. I almost never record shows or movies, so it doesn't, matter  for me, the rest of the skin is fully changed to 12h (am/pm) format. I simply wanted  to modify a nice skin, so people that prefer 12h format to use it




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users