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).
August 21st, 2007 at 5:47 am
Tina-cious.com says:
Well… at least YOUR word verification is an actual WORD! LOL
See? I’m not unreasonable!
BTW, I’m diggin’ your blog.
October 9th, 2007 at 5:16 am
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.
November 4th, 2008 at 1:55 am
Rene says:
Love this thing! Very usefull.
Thanks!
January 9th, 2009 at 1:55 pm
Kevin says:
you could make this even more useful by having the year default to the current year instead of 2000…
January 9th, 2009 at 2:50 pm
Peter says:
Thanks for the suggestion, Kevin. I’ve now made it so that it shows the current month, day, and year by default.