• <small id='ApCkj'></small><noframes id='ApCkj'>

    • <bdo id='ApCkj'></bdo><ul id='ApCkj'></ul>
      <tfoot id='ApCkj'></tfoot>

        <i id='ApCkj'><tr id='ApCkj'><dt id='ApCkj'><q id='ApCkj'><span id='ApCkj'><b id='ApCkj'><form id='ApCkj'><ins id='ApCkj'></ins><ul id='ApCkj'></ul><sub id='ApCkj'></sub></form><legend id='ApCkj'></legend><bdo id='ApCkj'><pre id='ApCkj'><center id='ApCkj'></center></pre></bdo></b><th id='ApCkj'></th></span></q></dt></tr></i><div id='ApCkj'><tfoot id='ApCkj'></tfoot><dl id='ApCkj'><fieldset id='ApCkj'></fieldset></dl></div>
      1. <legend id='ApCkj'><style id='ApCkj'><dir id='ApCkj'><q id='ApCkj'></q></dir></style></legend>
      2. 日期时间到 Unix 时间戳

        时间:2024-04-13
          <tbody id='8Y9z1'></tbody>

        • <bdo id='8Y9z1'></bdo><ul id='8Y9z1'></ul>

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

            <small id='8Y9z1'></small><noframes id='8Y9z1'>

                  本文介绍了日期时间到 Unix 时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  是否有人使用 PHP 函数将格式为 0000-00-00 00:00:00(datetimesql) 的日期转换为 unix 时间戳?

                  Is there anyone sitting on a PHP function to convert a date of format 0000-00-00 00:00:00(datetimesql) to unix timestamp?

                  推荐答案

                  要在 PHP 5.2 中执行此操作,您可以这样做:

                  To do this in PHP 5.2 you can do this:

                  $datetime = new DateTime();
                  echo $datetime->format('U');
                  

                  从 PHP 5.3 开始,一种更新的方法是:

                  A newer way to do this as of PHP 5.3 is:

                  $datetime = new DateTime();
                  echo $datetime->getTimestamp();
                  

                  这篇关于日期时间到 Unix 时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:通过回显将日期时间/时间戳从 PHP 传递到 Javascript 下一篇:将日期转换为 UNIX 时间戳

                  相关文章

                  <small id='8hTtD'></small><noframes id='8hTtD'>

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

                    1. <legend id='8hTtD'><style id='8hTtD'><dir id='8hTtD'><q id='8hTtD'></q></dir></style></legend>
                      • <bdo id='8hTtD'></bdo><ul id='8hTtD'></ul>