• <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 时间戳

        Datetime To Unix timestamp(日期时间到 Unix 时间戳)
          <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 时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                  datetime to timestamp(日期时间到时间戳)
                  PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                  Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                  Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                  Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)

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

                    <tbody id='8hTtD'></tbody>
                  <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>

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