PHP Unix timestamp generator and reverse date generator (with Ajax)

First published on August 19, 2007

Sometimes I’ll be editing a database and need to change a date. However, since dates are often stored as timestamps (January 1, 2000 is represented by 946684800), I cannot simply enter the date — the timestamp needs to be calculator. I found a generator here, but it forces a page reload after each submission, and if I want to calculate a bunch of similar dates, the form doesn’t remember what I’ve entered.

Here’s my Ajax-supported timestamp generator, which provides the necessary information on the same page and is more user-friendly for calculating similar dates.

Here’s a reverse date generator based on a timestamp:

Thanks to this Ajax tutorial for providing the basis for my first Ajax application (if you can call it that).


5 Responses to “PHP Unix timestamp generator and reverse date generator (with Ajax)”

  1. says:

    Well… at least YOUR word verification is an actual WORD! LOL

    See? I’m not unreasonable! :P

    BTW, I’m diggin’ your blog. :D

  2. martin says:

    this for sure is some very useful crap.
    it’s particularly useful because all the other timestamp calculators are fix in the timezone so you have to calculate the zone offset yourself.
    keep up the good crap, peter and thanx a bucketload.

  3. Rene says:

    Love this thing! Very usefull.

  4. Kevin says:

    you could make this even more useful by having the year default to the current year instead of 2000…

  5. Peter says:

    Thanks for the suggestion, Kevin. I’ve now made it so that it shows the current month, day, and year by default.

Speak your mind

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word