When I view the variables that I currently have in my session, I see:
[loginCreated] => 2004-06-12
So far so good.
Then I have some code that pulls the variables out of the session that I need:
/////////////////////////////////////////////////////////////////////////
// Grab variables out of the session
/////////////////////////////////////////////////////////////////////////
Oh, lorenw, I figured the error out, because I didn’t have $_session put inside the ( ). But like I said in my original post, the value in the session has always been correct. I’m just having a hard time figuring out why the date is formatted as:
You probably haven’t called session_start on that page. So $_SESSION[‘loginCreated’] will be empty. When you do strtotim() the result will be 0 (1 Jan 1970), which in your server’s timezone is Dec 31, 1969.
Check the value of $timestamp2 before and after calling strtotime