I would like to save the date and time in the following format in the database
a) DD-MM-YYYY or I could add HH-MM b) since my servers are located in the USA, I would like to get the time according to IST. now it will be GMT: +5: 30
I used to store the date in mysql in this format timestamp (int (11)): 1291746600. I used to convert the date with strtotime (); currently my intention is to store the date - it's just to store and display. in the future I would like to calculate no. days, months, etc.
What would be the best solution for this?
P: S: I would appreciate it if someone could explain to me what data type to use and how to use it with PHP.
source
share