Results 1 to 6 of 13

Thread: Clock Gadgets - Change Time Format

Threaded View

  1. #1
    Terrapin2190 is offline
    Mascot

    Join Date
    Apr 2015
    Location
    Urff
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Sex:

    Clock Gadgets - Change Time Format

    I recently installed a few HUD gadgets and realized the clock is stuck in 24-hour/military time for some reason.Anyone know if there's a way to change the time format in the javascript entries?

    I poked around a bit in 'C:\Users\[username]\AppData\Local\Microsoft\Windows Sidebar\Gadgets\Airlock Blue Digital Clock.gadget\js' (an easier way to get there is to type 'shell:gadgets' into the start menu search bar), opened the 'clock.js' file by right-click > Edit and noticed there is a line under "Initial Settings" that looks like this:
    Code:
    function view()
    {
        if (!document.images)
        return
        var Digital=new Date()
        var hours=Digital.getHours()
        var minutes=Digital.getMinutes()
        var seconds=Digital.getSeconds()
        if ((hours>=00)&&(minutes>=1)||(hours>=13))
        {
        hours=hours
        }
        if (hours==0)
        hours=12
        extract(hours,minutes,seconds)
        setTimeout("view()",1000)
    }
    The hours>=13 and hours=12 gives me something to go on. I'm just getting into learning command lines and VERY basic coding... but hours=12 would make it seem that the clock would display 12-hour mode instead of 24-hour mode. Perhaps I just need a restart for it to display correctly? A nice fresh restart seems to fix a lot of mishaps haha.
    Last edited by Terrapin2190; April 4th, 2015 at 10:17 PM.


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to change date/time selector background color?
    By reloaded_ in forum Windows Style Builder v1.5 Tutorials
    Replies: 2
    Last Post: February 10th, 2016, 09:30 AM
  2. cant figure out how to change the clock in windows 7
    By nighttrain in forum Time\Date CPL
    Replies: 4
    Last Post: April 4th, 2015, 10:35 PM
  3. Help me to change clock theme orange blade
    By vlad tepes in forum Help & Support
    Replies: 1
    Last Post: June 19th, 2011, 06:15 PM
  4. how to change clock font?
    By peinz in forum Theme Building Questions
    Replies: 9
    Last Post: June 4th, 2011, 06:48 AM
  5. how to change the clock im using 64bit win7
    By xhiane in forum Time\Date CPL
    Replies: 1
    Last Post: June 6th, 2010, 11:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •