I have spent ages trying to work this out but can’t seem to find anything specific to what I need to do and was hoping that you could give me some further info and point me in the right direction.
Basically I am making a suggestions section in a secure area of some new online software I am building.
I want to add the date and time that the suggestion or suggestion reply is added… in saying that I want to pull the information out and show the time as the local time for the user.
I have already set it up so the user has a time zone set such as Australia/Brisbane or Australia/Sydney so we know what time zone the user needs to see.
I need to know how I should save the time to the database… I think I need the column in the database to be datetime (is that correct?) but I am not too sure what function I should use to add the date and time… any ideas?
I am thinking that I should add the date and time as GMT however my server time is set to Brisbane, Australia… do I try and use GMT or my server time?
Then once the correct time is in the database is there a function to call it back out and adjust it to the correct time zone of the user?
Any help with this would be great… I think part of my issue is not knowing what terms to search for.