I am bulding a component for joomla which has announcements for others. And that announcements have creation date and date for its events. My clients can be in different countries. One can be in two countries in two different moment. So his timezone should be dynamic I think. which way is better to set the creation date and event date for this type of problem.
Share
You should ALWAYS store data in UTC (GMT) time, ideally in the form of a Unix timestamp. This is a standard that is not subject to any type of Daylight Savings Time changes and is perfect for saving a constant point in time.
Then, when displaying the date and time to an individual user, you can convert that timestamp into their local date and time.