Technical question about handling dates
This is an open discussion with 3 replies, filed under General.
Search
Hmm, It stores 3 things. Two timestamps and a string representation. The problem we faced was the datetime
field is fairly restrictive, and wouldn’t retain the timezone/offset information. The date stored by Symphony is of ISO 8610
format (added in PHP5). It looks like 2009-07-27T15:05:00+10:00
. A datetime
field looks like 2009-07-27 15:05:00
, which is not good enough. So, the only way to store an ISO 8610
date in MySQL is to use a varchar
field.
Yeah, the only solution I know of for that on a MySQL level is to store everything as +0/UDT/GMT, and convert as needed. (using a system-level “default” offset, and mathematically manipulating the value for other zones)
Thanks!
Create an account or sign in to comment.
Hello,
Why Symphony store dates on a
varchar
field type and notdatetime
? What are pros and cons?Sorry for dumb question.