Hey I am working on my social network project. So I m so confused with the issue related with date and time of update,comment,messages and anything wherever I am showing date and time.
Suppose I am sorting my updates using date and time. I am storing date and time in mysql using CURDATE() and CURTIME() functions respectively.
Suppose, I just posted something in India on my profile at 6.40 pm. So when it shows on my London friend profile, it will show stored date and time means Indian date and time. But Indian time is ahead of the UK time. So it will show 6.40Pm for that update when current time of London is 2.10PM. So showing 6.40Pm which is not the good thing for them. So I have to show local time for that post means 2.10Pm. Basically I want to show all updates time is less than current date and time of the user but it is impossible for updates posted by ahead time countries. So How to store and convert these date and time according users countries.
I hope you all understand and will save my day by helping me. And you also free to ask questions if you don't understand any part. Thank you all.
Aucun commentaire:
Enregistrer un commentaire