Why is the standard session lifetime 24 minutes (1440 seconds)?

后端 未结 2 1206
北恋
北恋 2020-12-23 15:56

I\'ve been doing some research on PHP Session Handling and came across the session.gc_maxlifetime value of 1440 seconds. I\'ve been wondering why the standard v

2条回答
  •  既然无缘
    2020-12-23 16:17

    1440 is used in a time calculation turning seconds into hours/days.

    • 1 day = 24 hours ( hours * 24 = 1 day )
    • day = 1440 minutes ( minutes * 60 * 24 = 1 day )
    • day = 86400 seconds ( seconds * 60 * 1440 = 1 day )

    Example:

    9 days [* 60] = 540 [* 1440] = 777600 seconds

    The same is true in reverse:

    777600 seconds [/ 1440] = 540 [/ 60] = 9 days

提交回复
热议问题