mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-523: Tell Doctrine2 to force a timezone for a date or datetime column #650
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Apr 15, 2010).
Jira issue originally created by user ssurowiec:
I'm working on a project that will live on multiple servers in multiple time zones and it would be great if I could tell Doctrine2, either through mappings or some other means, that all dates going into the DB should be normalized to a given time zone (such as GMT) and then be changed back to the servers local time on select. This can be accomplished using events right now but might be useful for other people in the same boat as me.
@doctrinebot commented on GitHub (Apr 15, 2010):
Comment created by ssurowiec:
Attached is a sample DateTimeType class I modified to do this. This is a quick, dirty, solution but illustrates the idea.
@doctrinebot commented on GitHub (Apr 16, 2010):
Comment created by @beberlei:
We won't change the current behaviour since its the 95% use-case.
In your case, you could either:
@doctrinebot commented on GitHub (Apr 16, 2010):
Issue was closed with resolution "Won't Fix"
@doctrinebot commented on GitHub (Apr 10, 2012):
Comment created by bschussek:
Benjamin, could you give more information about the 95%? I'm trying to understand this issue a bit better, but fail to see the many use cases for the current behavior.
@doctrinebot commented on GitHub (Dec 13, 2015):
Imported 1 attachments from Jira into https://gist.github.com/ce8e3a72a5d7e9bc732c