Monkuar Posted September 11, 2012 Share Posted September 11, 2012 I accidentally have: $time = time(); and $time = time(); in the same php file, under no ifs or functions and it looks like sometimes if I call $time once, the unixtimestamp actually adds more time to the original time()? any truth or bug reports related to do this? i know I should only be using 1 right? But I just found this bug on my site and some of my timestamps translate into September 13th? It happens around once a day? (That's an extra 2 days or around that) so was just wondering, I know i'll remove both $variables and make only 1 variable for time, but just to make sure this is the bug, calling 2x time()'s could cause this or what's the probability? literally all I am doing in my script (mysql update) is: last_post='.$time.' (so i know nothing else is effecting it) but just wondering/curious, thanks Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 11, 2012 Share Posted September 11, 2012 Can you post the entire section of code? Quote Link to comment Share on other sites More sharing options...
scootstah Posted September 12, 2012 Share Posted September 12, 2012 A period of time exists between the start and end of a script. So, multiple calls to time() might not necessarily be the same. I wouldn't expect it to be off more than a second or two, and certainly not by days. Something else is at play here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.