how to maintain timestamp in various countries
<p>I have a problem with timestamp.Let me tell you suppose a user uploads a picture somewhere in USA at 4.30 am and if another user sees this picture in japan.It would show 4.30 am as the date saved in database would be 4.30 am but it should be 4.30 pm to the japanese people, as they are 12 hours  faster than america.</p>

<p>So I was thinking to get the current server time using php lets say it is <code>a</code>and also get the current time of user using javascript functions  say it is <code>b</code> and then find the difference between <code>b</code> and <code>a</code> and that result should be added to the date stored in the database.</p>

<p>so server may show 4.30 am and js function gives 4.30 pm it would give 12 hrs difference so this 12 hrs should be added to the date saved in the database.This is what i thought of doing but im not sure if there are any inbuilt plugins in doing the task because every site will be using this type of feature may be they might be using someones open source code.</p>

<p>Also there might be any other better solutions? kindly let me know if there is any other way to do? and is my algorithm is right? i was thinking it is little bit time consuming getting the difference and adding those to all the posts would be little time consuming but let me know it please.any help is greatly appreciated.Thanks</p>
