PostgresでDoctrine2を使用しています。1 つのテーブルに、2 つの異なる日付型があります:birthdate:date
とcreated_at:datetimetz
. どちらも DateTime オブジェクトになりますが、 は異なりtimezone_type
ます。リストは次のとおりです。
created_at
日時:
DateTime Object
(
[date] => 2013-04-18 11:54:34
[timezone_type] => 1
[timezone] => +02:00
)
birthdate
日にち:
DateTime Object
(
[date] => 1970-01-01 00:00:00
[timezone_type] => 3
[timezone] => Europe/Berlin
)
同じ方法でオブジェクトをフォーマットする必要があります。両方が必要timezone_type=3
です。
どうすればそれを達成できますか?