WordPress.org

Ready to get started?Download WordPress

Forums

Clock On my Theme (8 posts)

  1. 2johnsons
    Member
    Posted 6 years ago #

    I downloaded a them that shows the current time but the current time that's being shown is in military time. How can I change that.What is the actual code to stop the clock from displaying in military time?

  2. Joni
    Member
    Posted 6 years ago #

    Can you provide a link to the theme you downloaded or to your site?

  3. Joni
    Member
    Posted 6 years ago #

    And please edit the tag "miliary" so that people who might be searching for "military" (and I'd suggest "military time" instead) will find this post.

  4. 2johnsons
    Member
    Posted 6 years ago #

    The site is still being developed but you can view it at http://www.speak.ejvj.com

  5. ClaytonJames
    Member
    Posted 6 years ago #

    See if there is something like this in your liveclock.js javascript:

    // Display the time in 24 or 12 hour time?
    // 0 = 24, 1 = 12

    var my12_hour = 1;

    By default, the script I have was set to 0 (24 hr clock)

  6. ClaytonJames
    Member
    Posted 6 years ago #

    I took a look at the clock javascript you are using. It is a little bit different than the liveclock.js I have. You can find it in your themes folder at;

    /sodelicious_black/js/js_liveclock.js

    I think that if you un-comment these two lines;

    // if (hours>12) { hours=hours-12 }
    // if (hours==0) { hours=12 }

    It may give you a 12 hour clock. Someone please jump in if I'm incorrect. Best of luck!

  7. 2johnsons
    Member
    Posted 6 years ago #

    I would like to thank everyone that has provided me with information to solve my problem I really appreciate it.
    Thank you.

  8. Len
    Member
    Posted 6 years ago #

    I know the issue is resolved but I thought I'd throw this out there in case someone else stumbles across this thread. You can add time and date to your blog with simple PHP rather than using javascript. For instance <?php echo date("F j, Y, g:i a"); ?> will output Month,date,year,time(am/pm) More info here.

Topic Closed

This topic has been closed to new replies.

About this Topic