JavaScript and PHP unix timestamp for right now, and a date of your choice

/, JavaScript, jQuery, PHP/JavaScript and PHP unix timestamp for right now, and a date of your choice

JavaScript and PHP unix timestamp for right now, and a date of your choice

From time to time I find myself in need of knowing what the current epoch timestamp is, either in javascript or in php. More times then less I also find myself recreating a similar function to determine either respectively for either language. But sometimes I find it just so much more easier to have a pre-made function that I can either just see what that number is by going to a bookmark in my browser and getting the equivalent of now for my needs. Or in the event I need to future date something I just want the number. So I am making this simple little form for my benifit but figure so many of you will also enjoy it. Any feedback is welcome.\r\n\r\ntypical javascript method:\r\n
var currTime = new Date().getTime();
\r\ntypical php method:\r\n
$currTime = time();
\r\nSelect Time & Date:
\r\n\r\n\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
PHP:
0
JavaScript:
0


\r\nCurrent time displayed in select’s above is based on the servers location/timezone: which is offset from GMT by \r\n\r\n
By | 2014-01-05T10:07:38+00:00 August 31st, 2012|Code, JavaScript, jQuery, PHP|1 Comment

About the Author:

Not much to know about me, I'm a 35+ year old coder, geek, gamer..

One Comment

  1. googlepo September 11, 2012 at 1:04 am

    There’s a wealth of information here. I’ll be back again.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: