Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

日時データ型の対応 #2308

merged 7 commits into from May 11, 2017


Copy link

chihiro-adachi commented May 9, 2017

概要(Overview・Refs Issue)

#1199 の対応




  • timestamp with timezoneを使う
    • 内部的にはUTC時刻で表現される
  • ormから投入するデータは、全てUTCに変換して保存する
    • select時はアプリ側のtimezoneに変換する
    • insert時はUTCに変換してinsert
  • 接続時に、Set timezone TO 'UTCする
    • dbalで直接sqlを実行した場合を想定
    • current_timestampやnowした時に、UTCで検索/更新するため
  • 参考


~~~`SQLSTATE[HY000]: General error: 1298 Unknown or incorrect time zone: 'UTC'`~~~

~~~ で対応

## テスト(Test) にselect/insertのテストコードを追加

## 相談(Discussion)
@chihiro-adachi chihiro-adachi changed the title WIP:日次データ型の対応 WIP:日時データ型の対応 May 9, 2017
@chihiro-adachi chihiro-adachi force-pushed the chihiro-adachi:dev-timezone branch from dc0fe15 to a9e66fd May 10, 2017
@chihiro-adachi chihiro-adachi changed the title WIP:日時データ型の対応 日時データ型の対応 May 10, 2017
@chihiro-adachi chihiro-adachi added this to the 3.1.0 milestone May 10, 2017

This comment has been minimized.

Copy link
Contributor Author

chihiro-adachi commented May 10, 2017

mysqlのset timezoneの設定方法を確認 +00:00

@chihiro-adachi chihiro-adachi force-pushed the chihiro-adachi:dev-timezone branch from 91d82f0 to 229ee3c May 10, 2017
@kiy0taka kiy0taka merged commit 70c10e7 into EC-CUBE:experimental/3.1 May 11, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@chihiro-adachi chihiro-adachi deleted the chihiro-adachi:dev-timezone branch May 11, 2017
@Yangsin Yangsin mentioned this pull request Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.