Jump to content

$_SERVER['REQUEST_TIME']


Solar
 Share

Recommended Posts

  • 5 months later...

just found this on Google by searcing for REQUEST_TIME and said id bump it ...

 

Dos anyone have any idea how may i output the real date from the Time Stamp ?

 

i would like to make some convertor to convert from

DD.MM.YYYY Into a Unix Time stampand the vice versa...

 

Anyway you want it.

Couple with this which understands these formats

echo date('Y-m-d',strtotime('30.12.2010'));

Link to comment
Share on other sites

i figured out how to convert a TimeStamp to real time

by doing this

$time	 	= $_SERVER['REQUEST_TIME'];//Onix Time Format
print date('Y-m-d H:i:s', $time); // 2010-09-26 04:25:49

 

But i dont know how to convert 2010-09-26 04:25:49 Back to a Time Stamp

Any ideas?

 

 

nevermind .. i figured how to do it

seems that the mktime function dos it

Link to comment
Share on other sites

i figured out how to convert a TimeStamp to real time

by doing this

$time	 	= $_SERVER['REQUEST_TIME'];//Onix Time Format
print date('Y-m-d H:i:s', $time); // 2010-09-26 04:25:49

 

But i dont know how to convert 2010-09-26 04:25:49 Back to a Time Stamp

Any ideas?

 

 

nevermind .. i figured how to do it

seems that the mktime function dos it

 

strtotime does that

Link to comment
Share on other sites

  • 3 weeks later...
This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.