Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum time() | PHP

Tags:

It's kind of a silly question, but what would be the maximum INT value of a time() and it's future date, e.g.

1st January 2999

Would time() ever get to that value? Going for a large time() value would return this:

Thu 1st Jan 1970 1:00AM

A normal int date

1287320788 - outputs today's date: Sun 17th Oct 2010 2:06PM

But I'm only curious for the biggest int date and the last date.

like image 955
MacMac Avatar asked Oct 17 '10 13:10

MacMac


People also ask

What is maximum execution time?

Maximum execution time (max_execution_time) is a time limit on how long a PHP script can run. It is a way hosting providers can limit the use and abuse of server resources, especially for shared hosting. The actual default value depends on the hosting, but it-s usually set to 30 (i.e. 30 seconds).

How do you calculate max execution time?

You can control the amount of time PHP allows scripts to run by changing the max_execution_time directive in your php. ini file. To verify the current value of the max_execution_time directive and other directives, you can use the phpinfo() function.

What is maximum max_execution_time in PHP?

One of these rules, Max_Execution_Time, defines the maximum time a script can run for. By default, this is set to 30 seconds. If a script runs for longer than 30 seconds, it is automatically stopped, and an error is reported.


1 Answers

The last 32-Bit Integer timestamp will be reached January 19, 2038. This is known as the Year 2038 problem.

like image 192
Pekka Avatar answered Sep 21 '22 01:09

Pekka