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

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

    <tfoot id='UUZr3'></tfoot>

    • <bdo id='UUZr3'></bdo><ul id='UUZr3'></ul>

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

      1. <legend id='UUZr3'><style id='UUZr3'><dir id='UUZr3'><q id='UUZr3'></q></dir></style></legend>

        如何設(shè)置 MySQL 的時(shí)區(qū)?

        How do I set the time zone of MySQL?(如何設(shè)置 MySQL 的時(shí)區(qū)?)
        • <tfoot id='zSQfl'></tfoot>

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

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

                1. <legend id='zSQfl'><style id='zSQfl'><dir id='zSQfl'><q id='zSQfl'></q></dir></style></legend>
                  本文介紹了如何設(shè)置 MySQL 的時(shí)區(qū)?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  在一臺(tái)服務(wù)器上,當(dāng)我運(yùn)行時(shí):

                  On one server, when I run:

                  mysql> select now();
                  +---------------------+
                  | now()               |
                  +---------------------+
                  | 2009-05-30 16:54:29 |
                  +---------------------+
                  1 row in set (0.00 sec)
                  

                  在另一臺(tái)服務(wù)器上:

                  mysql> select now();
                  +---------------------+
                  | now()               |
                  +---------------------+
                  | 2009-05-30 20:01:43 |
                  +---------------------+
                  1 row in set (0.00 sec)
                  

                  推薦答案

                  我認(rèn)為這可能有用:

                  default-time-zone='+00:00'
                  

                  @@global.time_zone 變量

                  查看它們?cè)O(shè)置的值:

                  @@global.time_zone variable

                  To see what value they are set to:

                  SELECT @@global.time_zone;
                  

                  要為其設(shè)置一個(gè)值,請(qǐng)使用其中之一:

                  To set a value for it use either one:

                  SET GLOBAL time_zone = '+8:00';
                  SET GLOBAL time_zone = 'Europe/Helsinki';
                  SET @@global.time_zone = '+00:00';
                  

                  (使用諸如歐洲/赫爾辛基"之類的命名時(shí)區(qū)意味著您必須正確填充時(shí)區(qū)表.)

                  (Using named timezones like 'Europe/Helsinki' means that you have to have a timezone table properly populated.)

                  請(qǐng)記住,+02:00 是一個(gè)偏移量.Europe/Berlin 是一個(gè)時(shí)區(qū)(有兩個(gè)偏移量),CEST 是對(duì)應(yīng)于特定偏移量的時(shí)鐘時(shí)間.

                  Keep in mind that +02:00 is an offset. Europe/Berlin is a timezone (that has two offsets) and CEST is a clock time that corresponds to a specific offset.

                  SELECT @@session.time_zone;
                  

                  要設(shè)置它,請(qǐng)使用其中之一:

                  To set it use either one:

                  SET time_zone = 'Europe/Helsinki';
                  SET time_zone = "+00:00";
                  SET @@session.time_zone = "+00:00";
                  

                  兩者都可能返回 SYSTEM,這意味著它們使用 my.cnf 中設(shè)置的時(shí)區(qū).

                  Both might return SYSTEM which means that they use the timezone set in my.cnf.

                  要使時(shí)區(qū)名稱起作用,您必須設(shè)置需要填充的時(shí)區(qū)信息表:http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html.我還在這個(gè)答案中提到了如何填充這些表格.

                  For timezone names to work, you must setup your timezone information tables need to be populated: http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html. I also mention how to populate those tables in this answer.

                  SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);
                  

                  如果您的時(shí)區(qū)為 +2:00,它將返回 02:00:00.

                  It will return 02:00:00 if your timezone is +2:00.

                  SELECT UNIX_TIMESTAMP();
                  SELECT UNIX_TIMESTAMP(NOW());
                  

                  獲取時(shí)間戳列作為 UNIX 時(shí)間戳

                  SELECT UNIX_TIMESTAMP(`timestamp`) FROM `table_name`
                  

                  獲取 UTC 日期時(shí)間列作為 UNIX 時(shí)間戳

                  SELECT UNIX_TIMESTAMP(CONVERT_TZ(`utc_datetime`, '+00:00', @@session.time_zone)) FROM `table_name`
                  

                  注意:更改時(shí)區(qū)不會(huì)更改存儲(chǔ)的日期時(shí)間或時(shí)間戳,但它會(huì)為現(xiàn)有時(shí)間戳列顯示不同的日期時(shí)間,因?yàn)樗鼈冊(cè)趦?nèi)部存儲(chǔ)為 UTC 時(shí)間戳并在當(dāng)前 MySQL 中外部顯示時(shí)區(qū).

                  Note: Changing the timezone will not change the stored datetime or timestamp, but it will show a different datetime for existing timestamp columns as they are internally stored as UTC timestamps and externally displayed in the current MySQL timezone.

                  我在這里做了一個(gè)備忘單:MySQL應(yīng)該有它的時(shí)區(qū)設(shè)置為 UTC?

                  I made a cheatsheet here: Should MySQL have its timezone set to UTC?

                  這篇關(guān)于如何設(shè)置 MySQL 的時(shí)區(qū)?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數(shù)根據(jù) N 個(gè)先前值來決定接下來的 N 個(gè)行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達(dá)式的結(jié)果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數(shù)的 ignore 選項(xiàng)是忽略整個(gè)事務(wù)還是只是有問題的行?) - IT屋-程序員軟件開發(fā)技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時(shí)出錯(cuò),使用 for 循環(huán)數(shù)組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調(diào)用 o23.load 時(shí)發(fā)生錯(cuò)誤 沒有合適的驅(qū)動(dòng)程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數(shù)據(jù)庫表作為 Spark 數(shù)據(jù)幀讀取?)
                  1. <tfoot id='nhfed'></tfoot>

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

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

                            <tbody id='nhfed'></tbody>
                            <legend id='nhfed'><style id='nhfed'><dir id='nhfed'><q id='nhfed'></q></dir></style></legend>
                            主站蜘蛛池模板: 国内精品视频在线观看 | 久久av网| 日韩成人av在线 | 免费观看a级毛片在线播放 黄网站免费入口 | 国产精品久久久久久妇女 | 久久久久99 | 欧亚av在线| 欧美韩一区二区 | 亚洲男女视频在线观看 | 午夜欧美| 久久99蜜桃综合影院免费观看 | 91精品国产91久久久久久不卞 | 天天玩夜夜操 | 欧美一区二区在线观看 | 成人伊人 | 狠狠操婷婷 | 国产久视频 | 日本手机看片 | 日韩精品在线一区二区 | www.99热.com | 欧美成视频 | 久久久久久国产免费视网址 | 亚洲精品一区国语对白 | 国产美女精品 | a视频在线观看 | 日韩免费 | 亚洲影音先锋 | 伊人久久国产 | 色橹橹欧美在线观看视频高清 | 欧美日韩久久久 | 一级看片免费视频 | 精品国产乱码久久久久久蜜柚 | 国产福利在线 | 国产在线播 | 日韩精品视频在线播放 | 亚洲精品日韩在线 | 91 在线| 老司机久久 | 欧美国产视频 | 激情小视频 | 黑人精品欧美一区二区蜜桃 |