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

使用 TYPO3 和 Fluid 正確處理時區

Correct timezone handling with TYPO3 and Fluid(使用 TYPO3 和 Fluid 正確處理時區)
本文介紹了使用 TYPO3 和 Fluid 正確處理時區的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

這讓我很困惑.我的模型中有一個用 DateTime 注釋的屬性.在我的數據庫中,它存儲為時間戳.在前端我使用 f:format.date viewhelper 來輸出這個屬性.

Its confusing me. I've a property in my Model which is annotated with DateTime. In my Database its stored as timestamp. In Frontend I use the f:format.date viewhelper to output this property.

當我創建新記錄并添加 f.e.01.06.2017 10:00 在這個字段中,在我的數據庫中存儲了 01.06.2017 08:00 的時間戳.在前端輸出是正確的.直到這里一切都很好.

When I create a new record, and add f.e. 01.06.2017 10:00 in this field, in my database is stored the timestamp for 01.06.2017 08:00. In Frontend the output is correct. Until here everything is fine.

三月份的最后一次時間更改導致輸出增加了兩個小時.我假設 10 月會再次改變,輸出將比這個:01.06.2017 08:00.

The last timechange in March lead to a + of two hours in output. I assume in October that will change again and the output will be than this: 01.06.2017 08:00.

我怎樣才能防止這種情況發生.當這些日期改變時,這絕對是一個問題,因為它對業務很重要.

How can I prevent this. Its definitely a problem when these dates change, because its important for the business.

我如何測試 10 月份會發生什么?

How can I test what will happen in October?

推薦答案

問題發生是因為 TYPO3 將時間標準化為 UTC.對于規范化(以及隨后的非規范化),它尊重服務器的時區設置.或 LocalConfiguration.php.
中給出的設置在 6.2 之前,有兩個設置 [SYS][serverTimeZone][SYS][phpTimeZone].
在 7.6 中,它只是 [SYS][phpTimeZone],因為服務器時區是從 php 本身檢測到的.

The Problem occurs as TYPO3 saves times normalized as UTC. for normalization (and afterwards denormalization) it respects the timezone-settings of the server. Or settings given in LocalConfiguration.php.
Up to 6.2 there were two settings [SYS][serverTimeZone] and [SYS][phpTimeZone].
With 7.6 it is only [SYS][phpTimeZone] as the servertimezone is detected from php itself.

您現在可以選擇通過將 [SYS][phpTimeZone] 設置為字符串UTC"來將服務器的時區偽裝為UTC".這樣一來,時間就不能再改變了.

You now have the option to fake the timezone of your server to "UTC" by setting [SYS][phpTimeZone] to the string "UTC". In this way no times should be changed any more.

這篇關于使用 TYPO3 和 Fluid 正確處理時區的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Typeorm Does not return all data(Typeorm 不返回所有數據)
MySQL return extra records when using a long type number to filter varchar type(MySQL在使用長類型數字過濾varchar類型時返回額外記錄)
MySQL Error #1071 - Specified key was too long; max key length is 767 bytes(MySQL 錯誤 #1071 - 指定的鍵太長;最大密鑰長度為 767 字節)
MySQL command-line table column width with utf8(MySQL命令行表列寬與utf8)
Python unicode encoding issue(Python unicode 編碼問題)
Create a MySQL stored function with a dynamic number of arguments(創建一個帶有動態參數數量的 MySQL 存儲函數)
主站蜘蛛池模板: 亚洲精品视频导航 | 久久精品一区二区 | 亚洲最大成人综合 | 91久久久久久久久久久 | 91精品国产乱码久久久久久久久 | 欧美国产日韩成人 | 一级午夜aaa免费看三区 | 看片国产 | 亚洲午夜精品一区二区三区他趣 | 亚洲电影第三页 | 成人免费在线电影 | 日韩第一区 | 四虎影 | 日韩精品视频在线 | 精品1区 | 国产高清一区二区 | 国产精品夜色一区二区三区 | 九七午夜剧场福利写真 | 6080亚洲精品一区二区 | 国产精品日韩一区二区 | 性色av一区| 精产国产伦理一二三区 | www日本高清 | 夜久久 | 久久亚洲国产精品 | 一区二区三区四区不卡视频 | 天天操网 | 国产精品mv在线观看 | 日韩a在线 | 国产高清久久久 | 四虎影视1304t| 中文字幕亚洲视频 | 日韩三级免费网站 | 欧洲一区二区三区 | 中文字幕免费视频 | 亚洲成人在线网 | 国外成人在线视频网站 | 色欧美片视频在线观看 | 韩日有码 | 在线视频91 | www国产成人免费观看视频,深夜成人网 |