CodeIgniter Forums
Integer Time Question - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Integer Time Question (/showthread.php?tid=67784)



Integer Time Question - wolfgang1983 - 04-09-2017

Currently I have both my remember me cookie and session cookie to expire 1440 which I think is about 15 min.


Should the cookie expire before or after if so what is the correct integer in 24 Hours 


I can't work out the math


7200 in integer is two hours I think


What is 24 hours in integer.


Thank you.


RE: Integer Time Question - JayAdra - 04-09-2017

60 seconds in 1 minute (60 seconds)
60 minutes in 1 hour (60 x 60 = 3600 seconds in 1 hour)
24hrs = 24 * 3600 seconds = 86,400 seconds


RE: Integer Time Question - wolfgang1983 - 04-09-2017

(04-09-2017, 02:53 AM)JayAdra Wrote: 60 seconds in 1 minute (60 seconds)
60 minutes in 1 hour (60 x 60 = 3600 seconds in 1 hour)
24hrs = 24 * 3600 seconds = 86,400 seconds

Thank you what should I set the main session at?

I have now set my cookie not the session to expire 43200


RE: Integer Time Question - InsiteFX - 04-09-2017

// days hours minutes seconds
30 days * 24 hours * 60 min * 60 sec


RE: Integer Time Question - wolfgang1983 - 04-09-2017

Opps just realized I did math wrong again I will read your way again silly me.


RE: Integer Time Question - wolfgang1983 - 04-09-2017

(04-09-2017, 03:19 AM)InsiteFX Wrote: // days     hours    minutes  seconds
30 days * 24 hours * 60 min * 60 sec

I thought this 43200 12 hours but for some reason cookie still showing 2017-04-09T22:38:00.242Z

I have cleared cookie not sure why it should show some thing like 2017-04-10T10:38:00.242Z

24 Hours was bit to long for testing wil use 24 hours on live site
2017-04-09T22:38:00.242Z
2017-04-09T22:38:00.242Z