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

  • <tfoot id='o0pID'></tfoot>

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

          <bdo id='o0pID'></bdo><ul id='o0pID'></ul>

      1. 设置全球时区

        时间:2023-10-11
          <tfoot id='8Hgsk'></tfoot>

            <tbody id='8Hgsk'></tbody>
            <bdo id='8Hgsk'></bdo><ul id='8Hgsk'></ul>
            1. <small id='8Hgsk'></small><noframes id='8Hgsk'>

                <i id='8Hgsk'><tr id='8Hgsk'><dt id='8Hgsk'><q id='8Hgsk'><span id='8Hgsk'><b id='8Hgsk'><form id='8Hgsk'><ins id='8Hgsk'></ins><ul id='8Hgsk'></ul><sub id='8Hgsk'></sub></form><legend id='8Hgsk'></legend><bdo id='8Hgsk'><pre id='8Hgsk'><center id='8Hgsk'></center></pre></bdo></b><th id='8Hgsk'></th></span></q></dt></tr></i><div id='8Hgsk'><tfoot id='8Hgsk'></tfoot><dl id='8Hgsk'><fieldset id='8Hgsk'></fieldset></dl></div>

                • <legend id='8Hgsk'><style id='8Hgsk'><dir id='8Hgsk'><q id='8Hgsk'></q></dir></style></legend>

                  本文介绍了设置全球时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在使用 Moment.js 来处理我的 Web 应用程序中的日期.服务器以 UTC 毫秒为单位返回所有日期.现在,我必须显示应用特定时区的日期(基于用户设置).

                  I am using Moment.js to handle dates in my web application. The server returns all the dates in milliseconds UTC. Now, I have to display the dates applying a specific timezone (based on the user settings).

                  有没有办法全局设置时区,而不是更改所有对 momentjs 的调用来处理它?<​​/p>

                  Is there any way to set the timezone globally instead of changing all the calls to momentjs to handle it?

                  推荐答案

                  您可以设置Moment 中的默认时区 使用:

                  moment.tz.setDefault(String);
                  

                  例如

                  moment.tz.setDefault("America/New_York");
                  

                  这篇关于设置全球时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:HTML 输入类型 datetime-local 设置错误的时区 下一篇:在 JS 中获取客户端时区(不是 GMT 偏移量)

                  相关文章

                  最新文章

                  <legend id='fPwo9'><style id='fPwo9'><dir id='fPwo9'><q id='fPwo9'></q></dir></style></legend>
                • <small id='fPwo9'></small><noframes id='fPwo9'>

                  <i id='fPwo9'><tr id='fPwo9'><dt id='fPwo9'><q id='fPwo9'><span id='fPwo9'><b id='fPwo9'><form id='fPwo9'><ins id='fPwo9'></ins><ul id='fPwo9'></ul><sub id='fPwo9'></sub></form><legend id='fPwo9'></legend><bdo id='fPwo9'><pre id='fPwo9'><center id='fPwo9'></center></pre></bdo></b><th id='fPwo9'></th></span></q></dt></tr></i><div id='fPwo9'><tfoot id='fPwo9'></tfoot><dl id='fPwo9'><fieldset id='fPwo9'></fieldset></dl></div>
                • <tfoot id='fPwo9'></tfoot>
                  • <bdo id='fPwo9'></bdo><ul id='fPwo9'></ul>