Jump to content

Recommended Posts

ok that is what I thought...let me ask you this then...

 

$nextTime 		= strtotime("next monday");
$update 		= mysql_query("UPDATE fd_users SET next_login = '".$nextTime."', last_login = '".time()."', times_logged = times_logged+1 WHERE email = '$username' AND password = '$password'") or die(mysql_error());

 

strtotime("now") is the same as time();

 

the last_login field (I used time(); here) shows october 11th which is today, yet the next_login (I used strototime("next monday"); here) field shows october 19th...i dont get it..it should be october 12th

Link to comment
https://forums.phpfreaks.com/topic/177362-strtotimenext-monday/#findComment-935166
Share on other sites

My Server:

strtotime('now'): Oct 11, 2009
strtotime('next monday'): Oct 12, 2009
time(): Oct 11, 2009

 

Production server:

strtotime('now'): Oct 11, 2009
strtotime('next monday'): Oct 19, 2009 //if strtotime(now) is oct 11th, next monday should be oct 12th....
time(): Oct 11, 2009

 

Something isnt right here... anyone know?

Link to comment
https://forums.phpfreaks.com/topic/177362-strtotimenext-monday/#findComment-935181
Share on other sites

What are the php versions on the two servers, because php.net has had a significant number of bugs in the strtotime().

Ok my server is: 4.4.9

Production server is: 4.3.10-22

Should I put a request in to update it to the latest version of php? Do you think that will fix it?

Support for PHP 4 has been discontinued since 2007-12-31. Please consider upgrading to PHP 5.

4.4.9

 

    * Released: 07 August 2008

    * Announcement: English

    * ChangeLog

    * Download:

          o PHP 4.4.9 (tar.bz2)

            md5: 2e3b2a0e27f10cb84fd00e5ecd7a1880

          o PHP 4.4.9 (tar.gz)

            md5: 9bcc1aba50be0dfeeea551d018375548

          o PHP 4.4.9 zip package

            md5: 7395068d5489a9f8abf50c6e4b48622f

I'd say so.

Link to comment
https://forums.phpfreaks.com/topic/177362-strtotimenext-monday/#findComment-935225
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.