Pages

Monday, January 2, 2012

Converting Timestamp into calendar-clock time values

Dupal and other PHP open sources store time as timestamp into database.
So, while working or debugging on such DB tables, one has to convert it into calendar-clock time format (mm/dd/yy- hh:mm:ss). Reason could be anything.

For this, either write your own php code or use this tool

Unix Timestamp Converter

You should know timezone of your web application.

In drupal 6 it is in admin/settings/date-time


Now to get the GMT offset of this timezone one can use

The World Clock

Type the city name in search city field. Go to city page.

Here you can find your timezone's GMT offset.

So, both tools together helps you to undertand your db table time values.

1 comment:

Anonymous said...

go check that website, you'll love it
http://writecodeonline.com/php/

(not mine, but if you like the timestamp decoder, this one is awesome to test parts of your code.)