I’m having some trouble figuring out the best way to do datetime conversions in Yii. I’m hoping you can point me in the right direction.
I have a webapp that does stores a lot of logging of systems that supply information in UTC time (from GPS) and I store that in my DB in UTC.
The forms that I have in my pages use the CJuiDatePicker and that supplies me a date in the form dd/mm/yyyy.
I now face a few things I want to understand;
What is the best way to convert the CJuiDatePicker form output in ‘dd/mm/yyyy’ to some sort of datetime class/timestamp?
How do I convert my DB UTC time back to the users timezone for presentation?
I already found the dateFormatter but how about timezone converions?