Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Showing the clock and date in skin

  1. #1
    markus625's Avatar
    Title
    ViX Beta Tester
    Join Date
    Dec 2011
    Posts
    1,104
    Thanks
    208
    Thanked 711 Times in 266 Posts

    Showing the clock and date in skin

    Guys thought it was about time we showed what different formats we can use to show the date/time etc in our skins and to help new skinner's out there.

    First the widget:

    HTML Code:
    <widget source="global.CurrentTime" render="Label" position="10,10" size="180,30">
    <convert type="ClockToText">see below</convert>
    </widget>
    Then the different formats show below for today's date Fri 18 January 2013 time 14:11 and 15 seconds.

    Default = 14:11
    Date = Friday 18 January 2013
    ShortDate = Fri 18/01
    Full = Fri 18/01 14:11
    Format:%a %d/%m/%y = Fri 18/01/13
    Format:%A = Friday
    Format:%H:%M = 14:11
    Format:%S = 15 (seconds)
    Format:%h = Jan
    Format:%D = 01/18/13
    Format:%Y = 2013
    Format:%d/%m = 18/01
    Format:%B = January
    Format=%Z = GMT (time-zone)

    Below should show the time in the 12 hour clock format %I and the AM/PM represented by %p and also adding a # sign after the % sign should cancel out the leading zero but doesn't, also the %p or %P doesn't show AM or PM any chance Andy could implement this in the image.

    The below format should be showing 2:11 PM
    Format:%#I:%M %p = 02:11

  2. The Following 5 Users Say Thank You to markus625 For This Useful Post:

    bassethound (20-01-13),judge (18-01-13),Larry-G (18-01-13),s31teg (20-01-13)

  3. #2
    Larry-G's Avatar
    Title
    V.I.P
    Donated Member
    Join Date
    May 2010
    Posts
    32,542
    Thanks
    7,824
    Thanked 22,934 Times in 12,378 Posts
    Good idea, should help those who want to get involved but dont know where to start.
    My posts contain my own personal thoughts and opinions, they do not represent those of any organisation or group but my own.

    If you don't like what I post, Don't read it.

    SIMPLES.

  4. #3
    markus625's Avatar
    Title
    ViX Beta Tester
    Join Date
    Dec 2011
    Posts
    1,104
    Thanks
    208
    Thanked 711 Times in 266 Posts
    Have a look here for the different formats,
    Code:
    http://docs.rainmeter.net/manual/measures/time
    Just want to figure out how to show the time in am/pm like 2:14 pm etc etc.
    Last edited by markus625; 19-01-13 at 12:08.

  5. #4
    s31teg's Avatar
    Title
    Senior Member
    Join Date
    Apr 2012
    Location
    Newcastle
    Posts
    304
    Thanks
    140
    Thanked 32 Times in 26 Posts
    this is great, when im back im going to see if this works on the VFD of my ultimo!
    http://openvix.co.uk/stable.png
    ^^^^^ Current Status ^^^^^
    VIX - Quad Vu+ Ultimo
    IF THE POSTS HELP PLEASE CLICK THANKS OR ADD TO REP ↓

  6. #5
    s31teg's Avatar
    Title
    Senior Member
    Join Date
    Apr 2012
    Location
    Newcastle
    Posts
    304
    Thanks
    140
    Thanked 32 Times in 26 Posts
    update, i have managed to update the time on the VFD on the standby screen dont know how to for when the screen in use

    here is what i have changed, any help appreciated!!

    Code:
    	<widget source="global.CurrentTime" render="Label" position="0,22" size="120,45" font="FdLcD;46" halign="left" noWrap="1">			<convert type="ClockToText">Format:%#I:%M %p</convert>
    		</widget>
    http://openvix.co.uk/stable.png
    ^^^^^ Current Status ^^^^^
    VIX - Quad Vu+ Ultimo
    IF THE POSTS HELP PLEASE CLICK THANKS OR ADD TO REP ↓

  7. #6
    markus625's Avatar
    Title
    ViX Beta Tester
    Join Date
    Dec 2011
    Posts
    1,104
    Thanks
    208
    Thanked 711 Times in 266 Posts
    Quote Originally Posted by s31teg View Post
    update, i have managed to update the time on the VFD on the standby screen dont know how to for when the screen in use

    here is what i have changed, any help appreciated!!

    Code:
    	<widget source="global.CurrentTime" render="Label" position="0,22" size="120,45" font="FdLcD;46" halign="left" noWrap="1">			<convert type="ClockToText">Format:%#I:%M %p</convert>
    		</widget>
    Sorry mate not sure i can help you on that.

    But with the code i know so far that the #I is supposed to cancel out the leading zero which it doesnt at present and the %p is supposed to output the am/pm.

  8. #7
    digidude
    dont know if this will be of any help, but it explains everything used in the linux date command, and what exactly it does

    It can be the combination of any one of the following:

    %%-a literal %
    %a-locale's abbreviated weekday name (e.g., Sun)
    %A-locale's full weekday name (e.g., Sunday)
    %b-locale's abbreviated month name (e.g., Jan)
    %B-locale's full month name (e.g., January)
    %c-locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
    %C-century; like %Y, except omit last two digits (e.g., 21)
    %d-day of month (e.g, 01)
    %D-date; same as %m/%d/%y
    %e-day of month, space padded; same as %_d
    %F-full date; same as %Y-%m-%d
    %g-last two digits of year of ISO week number (see %G)
    %G- year of ISO week number (see %V); normally useful only with %V
    %h-same as %b
    %H-hour (00..23)
    %I-hour (01..12)
    %j-day of year (001..366)
    %k- hour ( 0..23)
    %l- hour ( 1..12)
    %m-month (01..12)
    %M-minute (00..59)
    %n- a newline
    %N- nanoseconds (000000000..999999999)
    %p-locale's equivalent of either AM or PM; blank if not known
    %P-like %p, but lower case
    %r- locale's 12-hour clock time (e.g., 11:11:04 PM)
    %R- 24-hour hour and minute; same as %H:%M
    %s- seconds since 1970-01-01 00:00:00 UTC
    %S-second (00..60)
    %t- a tab
    %T- time; same as %H:%M:%S
    %u-day of week (1..7); 1 is Monday
    %U-week number of year, with Sunday as first day of week (00..53)
    %V- ISO week number, with Monday as first day of week (01..53)
    %w-day of week (0..6); 0 is Sunday
    %W-week number of year, with Monday as first day of week (00..53)
    %x-locale's date representation (e.g., 12/31/99)
    %X-locale's time representation (e.g., 23:13:48)
    %y- last two digits of year (00..99)
    %Y-year
    %z-+hhmm numeric timezone (e.g., -0400)
    %:z-+hh:mm numeric timezone (e.g., -04:00)
    %::z-+hh:mm:ss numeric time zone (e.g., -04:00:00)
    %:::z-numeric time zone with : to necessary precision (e.g., -04, +05:30)
    %Z-alphabetic time zone abbreviation (e.g., EDT)

    Quote Originally Posted by markus625 View Post
    The below format should be showing 2:11 PM
    Format:%#I:%M %p = 02:11
    from the above, should be

    Format:%l:%M:%p
    Last edited by digidude; 20-01-13 at 20:15.

  9. #8
    digidude
    tried to edit my post, but it seems to be going a little wierd lol

    Format:%l:%M:%p

    lower case L, not an upper case I for the first one, should sort it out m8

  10. The Following User Says Thank You to digidude For This Useful Post:

    markus625 (21-01-13)

  11. #9
    s31teg's Avatar
    Title
    Senior Member
    Join Date
    Apr 2012
    Location
    Newcastle
    Posts
    304
    Thanks
    140
    Thanked 32 Times in 26 Posts
    Quote Originally Posted by digidude View Post
    tried to edit my post, but it seems to be going a little wierd lol

    Format:%l:%M:%p

    lower case L, not an upper case I for the first one, should sort it out m8
    i have changed the code and still the same, shows 12 hour on the standy vfd without AM/PM


    also i dont know how to change it when the box not in standby as that time is still in 24hour.. it seems that line only effects standby and not global format
    http://openvix.co.uk/stable.png
    ^^^^^ Current Status ^^^^^
    VIX - Quad Vu+ Ultimo
    IF THE POSTS HELP PLEASE CLICK THANKS OR ADD TO REP ↓

  12. #10
    digidude
    ive tried this morning with %p %P and %r, and none of them show the am/pm prefix. A lot of things on linux receivers use 'cut back' versions of the full linux commands, mainly to save space, and it looks like this may be one of those things

    %l:%M %a %d

    will show as

    7:49 Mon 21

  13. The Following User Says Thank You to digidude For This Useful Post:

    markus625 (21-01-13)

  14. #11
    s31teg's Avatar
    Title
    Senior Member
    Join Date
    Apr 2012
    Location
    Newcastle
    Posts
    304
    Thanks
    140
    Thanked 32 Times in 26 Posts
    to be honest im not that bothered about AM/PM

    did your changes update the clock when the box is on... (the little one bottom right)?
    http://openvix.co.uk/stable.png
    ^^^^^ Current Status ^^^^^
    VIX - Quad Vu+ Ultimo
    IF THE POSTS HELP PLEASE CLICK THANKS OR ADD TO REP ↓

  15. #12
    markus625's Avatar
    Title
    ViX Beta Tester
    Join Date
    Dec 2011
    Posts
    1,104
    Thanks
    208
    Thanked 711 Times in 266 Posts
    Quote Originally Posted by digidude View Post
    ive tried this morning with %p %P and %r, and none of them show the am/pm prefix. A lot of things on linux receivers use 'cut back' versions of the full linux commands, mainly to save space, and it looks like this may be one of those things

    %l:%M %a %d

    will show as

    7:49 Mon 21
    Cheers digidude at least we can use a 12-hour clock now in are skins, thanks or all the info.

  16. #13
    markus625's Avatar
    Title
    ViX Beta Tester
    Join Date
    Dec 2011
    Posts
    1,104
    Thanks
    208
    Thanked 711 Times in 266 Posts
    Ah tried upercase and lowercase L but this still shows the 24 hour clock

  17. #14
    digidude
    when my receivers in standby, it works without the leading 0

    Code:
    	<screen name="StandbySummary" position="0,0" size="132,64">
    		<widget source="global.CurrentTime" render="Label" position="0,0" size="120,64" font="Regular;48" halign="center" valign="center">
    			<convert type="ClockToText">Format:%l:%M %a %d</convert>

  18. #15
    markus625's Avatar
    Title
    ViX Beta Tester
    Join Date
    Dec 2011
    Posts
    1,104
    Thanks
    208
    Thanked 711 Times in 266 Posts
    Quote Originally Posted by digidude View Post
    when my receivers in standby, it works without the leading 0

    Code:
    	<screen name="StandbySummary" position="0,0" size="132,64">
    		<widget source="global.CurrentTime" render="Label" position="0,0" size="120,64" font="Regular;48" halign="center" valign="center">
    			<convert type="ClockToText">Format:%l:%M %a %d</convert>
    Ive tried the above %l in the quickepg screen but it shows up in 24 hour.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.