Re: update and timestamps

From: Date: Thu, 13 Jul 2000 20:57:07 +0000
Subject: Re: update and timestamps
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6562@lists.php.net to get a copy of this message
> $result=mysql_db_query($SQLDB,"UPDATE users.user SET time=now()+1200, >... > > and "update" works sometimes (I don't know why) > usualy if I reload page value 00000000000000 shows in field "time" in I ran into this a while ago too. If now() returns 19971215235026, then you add 1200 to it, you'll get 19971215236226. That means the time will then be 23 hrs, 62 mins and 26 secs. That's an illegal time so will be converted to zero. Date math needs to be done with Unix times, not timestamps. Enjoy, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y More than just answers. Solutions. (SM) http://www.analysisandsolutions.com/ 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#6562) next »