Re: Problems with Unix timestamp

From: Date: Sat, 23 Aug 2003 05:57:50 +0000
Subject: Re: Problems with Unix timestamp
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-21218@lists.php.net to get a copy of this message
bah, sorry for the spam. Was able to create my own timestamp with mktime and then do the eregi(mydate, $line), etc etc. Thanks anyways ~Steve Stephen March wrote:
Hey folks, simple question for you.. I'm trying to search through a page (with fopen) for a Unix timestamp (on Windows). Simply doing while(!feof($fd)) {
 $line = fgets($fd, 4096);    if(eregi(time(), $line)  ...
will not work.    Upon further investigation, I could not get  die(time())  to work, nor  $now=getdate() die($now[0]);
Any ideas?? This works on Linux Having said that, I tried the following work-around: $now = explode(" ", microtime()); $search = substr($now[1], 0, 7); microtime returns the correct time, however it's still not working quite right. It would be a lot simpler if time() actually returned something for me :) Thanks in advance, ~Steve


« previous php.windows (#21218) next »