I have a requirement in my application, in user registration user should select timezone. I have another column in database for user table called ‘date_of_registration’.
I need help on the ‘date_of_registration’ column type to create it as date or int.
If the column type is date then i should store date value. If the column type is int then i should store timestamp value.
I should show ‘date_of_registration’ in the front end by using the timezone .
EX. if y user has to view ‘date_of_registration’ of x user, ‘date_of_registration’ value should convert to y’s timezone and then show the final date.
Now if my column is of datatype int which Yii function should i use whether ‘CDateTimeParser’ or ‘CTimestamp’,
and if my column is of datatype date which Yii function should i use whether ‘CDateTimeParser’ or ‘CTimestamp’,
What is the best way to do, and which class is more flexible for using.
Thanks in advance,
Pavan