EventSaucePHP/EventSauce

PointInTime date form and MariaDB

bashilbers opened this issue · 1 comments

Hi,

I am using MariaDB 10.4.11 and it does not support the timezone identifier in a Datetime column. The PointInTime class used in this project is final and always adds the timezone as seen here: https://github.com/EventSaucePHP/EventSauce/blob/master/src/PointInTime.php#L14

Any suggestion on what type of column to use then?

I'd like to be able to only have date, time and microseconds.. timezone is always UTC for me

Hi @bashilbers,

If your dates are always in UTC then storing them as such is fine. You can use the $pointInTime->dateTime() getter to retrieve the underlying date-time and format that according to your needs. I'd just go for the datetime column without the timezone in your case.