Jump to content

$_SERVER['REQUEST_TIME']


Solar

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...

Link to comment
https://forums.phpfreaks.com/topic/199730-_serverrequest_time/#findComment-1115770
Share on other sites

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
https://forums.phpfreaks.com/topic/199730-_serverrequest_time/#findComment-1115776
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
https://forums.phpfreaks.com/topic/199730-_serverrequest_time/#findComment-1115910
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
https://forums.phpfreaks.com/topic/199730-_serverrequest_time/#findComment-1115935
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.