Calculate actual time from different timezones in php

Posted by Thinker on Stack Overflow See other posts from Stack Overflow or by Thinker
Published on 2010-05-10T10:55:46Z Indexed on 2010/05/10 11:14 UTC
Read the original article Hit count: 204

Filed under:
|
|

Hai,

I would like to calculate actual time from different timezones. I have two mysql tables

1.Timezone table: This table contians two fields (offset value, country name) values are ( -12:00, Eniwetok, Kwajalein) (-11:00, Midway Island, Samoa).... so on

2.My employee table This table contains the employees details with two field names (created_on, timezone) and the values are (current timestamp, -11:00) (current timestamp, -12:00)..... so on

Now, If my employee logged in to my system, i want to display the time according to their timezones values from tables.

Basically if my Current timestamp is :2010-05-10 15:41:39 offset values is: +5:30

my result should be : 10 May 2010 3:41pm

the same for different offset values for the same current timestamp. I believe i explained the issue correctly, if you want any information, please ask me.

© Stack Overflow or respective owner

Related posts about php

Related posts about html