久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <tfoot id='yOZHP'></tfoot>
    1. <i id='yOZHP'><tr id='yOZHP'><dt id='yOZHP'><q id='yOZHP'><span id='yOZHP'><b id='yOZHP'><form id='yOZHP'><ins id='yOZHP'></ins><ul id='yOZHP'></ul><sub id='yOZHP'></sub></form><legend id='yOZHP'></legend><bdo id='yOZHP'><pre id='yOZHP'><center id='yOZHP'></center></pre></bdo></b><th id='yOZHP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yOZHP'><tfoot id='yOZHP'></tfoot><dl id='yOZHP'><fieldset id='yOZHP'></fieldset></dl></div>

      <small id='yOZHP'></small><noframes id='yOZHP'>

      <legend id='yOZHP'><style id='yOZHP'><dir id='yOZHP'><q id='yOZHP'></q></dir></style></legend>
      • <bdo id='yOZHP'></bdo><ul id='yOZHP'></ul>
    2. 如何在特定時區的特定時間刷新特定日期的頁面

      How to refresh page on specific day at specific time in specific time zone?(如何在特定時區的特定時間刷新特定日期的頁面?)
    3. <tfoot id='3wuYr'></tfoot>

      <small id='3wuYr'></small><noframes id='3wuYr'>

      • <legend id='3wuYr'><style id='3wuYr'><dir id='3wuYr'><q id='3wuYr'></q></dir></style></legend>

            <tbody id='3wuYr'></tbody>
          • <bdo id='3wuYr'></bdo><ul id='3wuYr'></ul>

              <i id='3wuYr'><tr id='3wuYr'><dt id='3wuYr'><q id='3wuYr'><span id='3wuYr'><b id='3wuYr'><form id='3wuYr'><ins id='3wuYr'></ins><ul id='3wuYr'></ul><sub id='3wuYr'></sub></form><legend id='3wuYr'></legend><bdo id='3wuYr'><pre id='3wuYr'><center id='3wuYr'></center></pre></bdo></b><th id='3wuYr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3wuYr'><tfoot id='3wuYr'></tfoot><dl id='3wuYr'><fieldset id='3wuYr'></fieldset></dl></div>

                本文介紹了如何在特定時區的特定時間刷新特定日期的頁面?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在開發一個有兩個背靠背網絡廣播的網站.我使用 PHP 來顯示應該啟用和禁用按鈕的時間.現在我需要使用Javascript在第一次廣播之前,第二次廣播之前和第二次廣播之后自動刷新頁面.我實現了以下腳本,它確實在給定時間刷新了頁面,但是,它并不能完全按照我的需要工作.我需要更改腳本,使其僅在美國東部標準時間周日晚上 7:45、晚上 8 點和晚上 8:30 刷新頁面.

                I am developing a website that has two back to back web broadcasts. I have used PHP to display the time that the buttons should be enabled and disabled. Now I need to use Javascript to automatically refresh the page before the first broadcast, before the second broadcast and after the second broadcast. I implemented the following script and it does refresh the page at the given time, however, it doesn't work exactly as I need it to. I need to alter the script so that it refreshes the page on Sundays at 7:45pm, 8pm and 8:30pm EST only.

                我正在使用修改后的腳本 從這個回答的問題

                I'm using a modified script from this answered question

                function refreshAt(hours, minutes, seconds) {
                var now = new Date();
                var then = new Date();
                
                if(now.getUTCHours() > hours ||
                   (now.getUTCHours() == hours && now.getUTCMinutes() > minutes) ||
                    now.getUTCHours() == hours && now.getUTCMinutes() == minutes && now.getUTCSeconds() >= seconds) {
                    then.setUTCDate(now.getUTCDate() + 1);
                }
                then.setUTCHours(hours);
                then.setUTCMinutes(minutes);
                then.setUTCSeconds(seconds);
                
                var timeout = (then.getTime() - now.getTime());
                setTimeout(function() { window.location.reload(true); }, timeout);
                }
                

                然后我調用 refreshAt() 函數.

                Then I call the refreshAt() function.

                refreshAt(19,45,0); //Will refresh the page at 7:45pm
                refreshAt(20,00,0); //Will refresh the page at 8:00pm
                refreshAt(20,30,0); //Will refresh the page at 8:30pm
                

                我感到困惑的是如何更改此腳本以僅在周日為 EST 實現刷新.

                Where I get confused is how to alter this script to only implement the refresh for EST on Sundays.

                推薦答案

                我想通了.這是腳本:

                function refreshAt(hours, minutes, seconds, day) {
                    var now = new Date();
                    var then = new Date();
                    var dayUTC = new Date();
                
                    if(dayUTC.getUTCDay() == day) {
                
                        if(now.getUTCHours() > hours ||
                       (now.getUTCHours() == hours && now.getUTCMinutes() > minutes) ||
                        now.getUTCHours() == hours && now.getUTCMinutes() == minutes && now.getUTCSeconds() >= seconds) {
                        then.setUTCDate(now.getUTCDate() + 1);
                        }
                
                    then.setUTCHours(hours);
                    then.setUTCMinutes(minutes);
                    then.setUTCSeconds(seconds);
                
                
                    var timeout = (then.getTime() - now.getTime());
                    setTimeout(function() { window.location.reload(true); }, timeout);
                    }
                }
                

                然后我只調用 refreshAt() 函數:

                And then I just call the refreshAt() function:

                 refreshAt(20,00,0,1); //Will refresh the page at 8:00pm on Monday UTC or 3:00pm EST
                

                這篇關于如何在特定時區的特定時間刷新特定日期的頁面?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)

                  <tbody id='akeUM'></tbody>
              1. <small id='akeUM'></small><noframes id='akeUM'>

                <legend id='akeUM'><style id='akeUM'><dir id='akeUM'><q id='akeUM'></q></dir></style></legend>
                • <i id='akeUM'><tr id='akeUM'><dt id='akeUM'><q id='akeUM'><span id='akeUM'><b id='akeUM'><form id='akeUM'><ins id='akeUM'></ins><ul id='akeUM'></ul><sub id='akeUM'></sub></form><legend id='akeUM'></legend><bdo id='akeUM'><pre id='akeUM'><center id='akeUM'></center></pre></bdo></b><th id='akeUM'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='akeUM'><tfoot id='akeUM'></tfoot><dl id='akeUM'><fieldset id='akeUM'></fieldset></dl></div>
                  <tfoot id='akeUM'></tfoot>
                  • <bdo id='akeUM'></bdo><ul id='akeUM'></ul>

                        1. 主站蜘蛛池模板: 欧美精品二区 | 人人干人人看 | 四虎影院免费在线 | 中文字幕av一区 | 欧美成人一区二区 | 黄色大片免费网站 | 日韩av免费看 | 91在线电影 | 久久一| 亚洲视频免费 | 日韩性生活网 | 亚洲精品久久久久久宅男 | 亚洲国产精品激情在线观看 | 亚洲综合二区 | 成人在线观看欧美 | 激情婷婷| 国产乱码精品1区2区3区 | 久久久久久久久久久蜜桃 | 久久久九九 | 国产精品无码专区在线观看 | 天天操,夜夜爽 | 色香蕉在线 | 一区二区高清不卡 | 精品国产一级片 | 欧美一区二区三区视频 | 国产精品久久久久久久久久久久久 | 天天爱av | 91精品久久久久久综合五月天 | 精品美女久久久 | 91精品久久久久久久久久入口 | 国产9久| 538在线精品 | 亚洲第一网站 | 国产一级片91| 人人人人干 | 国产日韩视频在线 | 激情a| 日韩精品一区二区三区在线观看 | 最新国产精品视频 | 亚洲国产精品va在线看黑人 | 欧美日韩综合 |