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

使用 TYPO3 和 Fluid 正確處理時(shí)區(qū)

Correct timezone handling with TYPO3 and Fluid(使用 TYPO3 和 Fluid 正確處理時(shí)區(qū))
本文介紹了使用 TYPO3 和 Fluid 正確處理時(shí)區(qū)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

這讓我很困惑.我的模型中有一個(gè)用 DateTime 注釋的屬性.在我的數(shù)據(jù)庫(kù)中,它存儲(chǔ)為時(shí)間戳.在前端我使用 f:format.date viewhelper 來(lái)輸出這個(gè)屬性.

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.

當(dāng)我創(chuàng)建新記錄并添加 f.e.01.06.2017 10:00 在這個(gè)字段中,在我的數(shù)據(jù)庫(kù)中存儲(chǔ)了 01.06.2017 08:00 的時(shí)間戳.在前端輸出是正確的.直到這里一切都很好.

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.

三月份的最后一次時(shí)間更改導(dǎo)致輸出增加了兩個(gè)小時(shí).我假設(shè) 10 月會(huì)再次改變,輸出將比這個(gè):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.

我怎樣才能防止這種情況發(fā)生.當(dāng)這些日期改變時(shí),這絕對(duì)是一個(gè)問(wèn)題,因?yàn)樗鼘?duì)業(yè)務(wù)很重要.

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

我如何測(cè)試 10 月份會(huì)發(fā)生什么?

How can I test what will happen in October?

推薦答案

問(wèn)題發(fā)生是因?yàn)?TYPO3 將時(shí)間標(biāo)準(zhǔn)化為 UTC.對(duì)于規(guī)范化(以及隨后的非規(guī)范化),它尊重服務(wù)器的時(shí)區(qū)設(shè)置.或 LocalConfiguration.php.
中給出的設(shè)置在 6.2 之前,有兩個(gè)設(shè)置 [SYS][serverTimeZone][SYS][phpTimeZone].
在 7.6 中,它只是 [SYS][phpTimeZone],因?yàn)榉?wù)器時(shí)區(qū)是從 php 本身檢測(cè)到的.

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.

您現(xiàn)在可以選擇通過(guò)將 [SYS][phpTimeZone] 設(shè)置為字符串UTC"來(lái)將服務(wù)器的時(shí)區(qū)偽裝為UTC".這樣一來(lái),時(shí)間就不能再改變了.

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.

這篇關(guān)于使用 TYPO3 和 Fluid 正確處理時(shí)區(qū)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

Typeorm Does not return all data(Typeorm 不返回所有數(shù)據(jù))
MySQL return extra records when using a long type number to filter varchar type(MySQL在使用長(zhǎng)類(lèi)型數(shù)字過(guò)濾varchar類(lèi)型時(shí)返回額外記錄)
MySQL Error #1071 - Specified key was too long; max key length is 767 bytes(MySQL 錯(cuò)誤 #1071 - 指定的鍵太長(zhǎng);最大密鑰長(zhǎng)度為 767 字節(jié))
MySQL command-line table column width with utf8(MySQL命令行表列寬與utf8)
Python unicode encoding issue(Python unicode 編碼問(wèn)題)
Create a MySQL stored function with a dynamic number of arguments(創(chuàng)建一個(gè)帶有動(dòng)態(tài)參數(shù)數(shù)量的 MySQL 存儲(chǔ)函數(shù))
主站蜘蛛池模板: 婷婷97| 夜夜贪欢〈高h〉 | 中国av在线播放 | 91久色| 在线观看黄色av | 欧美亚洲激情 | 亚洲无av在线中文字幕 | 一级片久久 | 欧美亚洲在线观看 | 欧美视频在线观看 | 天天拍天天操 | 国产免费一区二区三区免费视频 | 欧美顶级黄色大片免费 | 秋霞一区 | 久久不雅视频 | 欧美性色网 | av在线精品 | www久久| 精品国产伦一区二区三区 | 国产三级久久 | 在线观看av免费 | 欧美综合久久 | 亚洲色欲色欲www在线观看 | 私人午夜影院 | 一区二区三区四区精品 | 成人免费动漫 | 国产三级在线看 | 精品一区在线播放 | 天天射av | 欧美亚洲三级 | 精品一区二区三区免费毛片 | 黄色片在线 | 免费国产网站 | 久久久夜色精品 | 黄色免费视频网站 | 午夜欧美 | 欧美特黄 | 91青青| 超碰在线中文字幕 | 黄色直接看 | 美女操操操 |