-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
DateTime's time zone should be normalized before saving #100
Comments
What about Next point is, how to get the server timezone value. I don't use the MySQL, but afaik, value |
@milo: i do no think we need a "yes pleas, shoot me in my leg" modifier getting the timezone is the tricky part. timezone is set by Dibi on connection start, but a "+02:00" format is also enabled* and currently used as default if no timezone is given *) allowing this could be considered as another bug, because setting offset in config file does not consider DST time shifts over the year. but it should be bacward compatible, i guess... my current sollution for Dibi is here: https://gist.github.com/paranoiq/6021606 |
Your solution is good for DBs without timezoned type. But what about e.g. PostgreSQL? Imagine the query, where $dibi->query('INSERT INTO tab (created) VALUES (%d)'); I think, instead of Your kind of solution for DateTime normalization is good and it is not in conflict in proposed
Agree. I parcipated in the discussion on Nette FW issue when it was removed. |
you are right. i missunderstood your first comment. in that case the
what issue do you mean? |
if a DateTime has different time zone, it shold be normalized to the time zone of server
there may be databases, which are capable of saving a datetime with timezone, so i am not sure yet, if the normalization shold occur in DibiFormater or in a Driver
(see also: nette/nette#1168)
The text was updated successfully, but these errors were encountered: