Support » Plugin: Uji Countdown » Uji Countdown – Setting it to a time zone

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author ujimoto

    (@ujimoto)

    In that case your countdown is different on every timezone. For example in Europe your count expire in one hour and other places expire in more hours or is already expired.

    I think you misunderstood. I am saying that is the problem right now.
    I downloaded and setup the visual preferences. Then put the countdown in a post set for 1230. Well it expired in Italy (GMT/UTC +0200) at 12:30 (local time) it then expired in Texas (GMT/UTC -0500)at 1230 local time, it then expired in Arizona (GMT/UTC -0700) at 1230 local time.

    So, it appears to me due to the problem I was having that the countdown is based off of the local time of the client and the time of the server.

    Please let me know if you need more clarification.

    Wil

    (@gravitationalfx)

    I have found the same problem.

    The countdown is pretty useless if you are developing for audiences that span one or more timezone.

    The fact that the web is a global thing, why would you use local time for the counter?

    Please amend the plugin urgently and set the counter to use the server time.

    It doesn’t make any sense otherwise.

    Wil.

    I came to this thread because I want to know how the countdown is displayed across time zones around the world.

    If I set the timer to expire at 18:00 EST, and it is currently 12:00 EST, then on my display I see 6 hours remaining on the clock.

    What I want to know is: will someone in California see 9 hours remaining or 6 hours remaining? That is, is the 18:00 deadline set according to the my time zone setting, the setting of the server, or the setting of the end user (where ever he or she may be the in world)?

    Wil

    (@gravitationalfx)

    Hi @apc33

    The plugin seems to use local PC time.

    Users will see the countdown relative to their timezone unfortunately.

    I hope the plugin author fixes the problem.

    Hi Will,

    Thanks for your answer. Actually, I just tested the plugin. I’m in Japan and I got on Skype with someone in the States. Their countdown clock was indeed 13 hours behind mine.

    I suppose it depends on what you want out of the plugin. For us, this is perfect, as we want the clock to expire at midnight on a certain day for all people (their own time), regardless of where they are.

    Glad to see I was not the only who was having this issue.

    Plugin Author ujimoto

    (@ujimoto)

    Thanks you for reporting this problem. Now is clear and fixed. Please update to version 1.0.8.

    Wil

    (@gravitationalfx)

    Super – thanks @ujimoto!

    A ‘fix’ for Wil is a ‘break’ for me. I hope the new version offers a choice of which timing mechanism to employ. That would meet everyone’s needs.

    Plugin Author ujimoto

    (@ujimoto)

    See can’t satisfy all. I will add an option in the next update to choose: local/server time. Until then please use version 1.0.7

    Updated to 1.0.8 but the timer still doesn’t agree across time zones. I’ve tried activating/deactivating, reinserting, creating a new timer, and no luck. Is there something I’m missing?

    As 10.0.8 is currently written, it will still display the local time. This is because when the Date object is created, JavaScript will automatically use the client timezone even though you are initializing it with the server time. The fix for this is to update the time object with the UTC time instead and subsequently set your countdown to when you want it to expire in UTC (e.g. if you want your counter to expire at 5 PM PDT you’d set it for midnight UTC).

    The code updates I made to get this working were in the countdown.js.php file.

    My updated serverTime() function now looks as follows:

    function serverTime() {
        var time = null;
        jQuery.ajax({url: uji_plugin + '/js/serverTime.php',
            async: false, dataType: 'text',
            success: function(text) {
                time = new Date(text);
    var utcTime = new Date(time.getUTCFullYear(), time.getUTCMonth(), time.getUTCDate(),  time.getUTCHours(), time.getUTCMinutes(), time.getUTCSeconds());
    time = utcTime; }

    no matter which time I choose it continues to expire in AM only. I tried military time.. both numbers on slider but can’t get it to go to PM.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Uji Countdown – Setting it to a time zone’ is closed to new replies.