You just knew there was a regexp version on the way, didn't you :)
Danny.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
That looks great.
But why do you have to carage the line after 3 in the function ?
"Danny Shepherd" <[EMAIL PROTECTED]> wrote in message
022001c22696$087e4cc0$0200a8c0@DANNYS">news:022001c22696$087e4cc0$0200a8c0@DANNYS...
> You just knew there was a regexp version on the way, didn't you :)
>
> D
Never mind that just needs a space
Thanx for all the help...
have a surf to http://forum.ywait.co.za/ register and then i'll make you a
MOD for the php scripting forum board.
for the future.
if you want
Cheerz
"Danny Shepherd" <[EMAIL PROTECTED]> wrote in message
022001c22696$087e4cc0$02
Hi folks
I have a filed in data type "time" , how would I compare the value submited from the
form with the value in that filed, which is in format "11:00:00" ?
When I do this in query:
select * from table where time < = '12:00:00'; ( in order select all records that have
time before noon)
it
rttime = start_timer();
// Script here ..
$endtime = stop_timer();
echo "Exec: ". number_format( script_time( $starttime, $endtime ),
6 ) ." sec";
py
- Original Message -
From: Phil Spitler <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 1
just use GMT it is much simpler just kidding
- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 2:07 AM
Subject: [PHP] time in annother zone
> Greetings,
>
> I
Lance Rochelle wrote:
> just use GMT it is much simpler just kidding
> $test = getenv("DATE_LOCAL");
> print("$test");
> ?>
The output of this was empty, so I guess i'm missing something, and the
getenv() page didn't shed any light on it.
Justin
--
PHP General Mailing List (http://www.p
On Mon, Apr 20, 2009 at 1:38 PM, wrote:
> Suggestion on faster solutions for extremely large database.
>
> $ledip['started'] = '2009-04-01 13:40:34'; Example time in DB
> $ledip['touchedlast'] = '2009-04-01 13:41:28'; Example time in DB
>
>
> date('i:s', strtotime($ledip['touchedlast']) -
> strto
I have a recursive procedure, and I set the time limit each time I enter it:
function rec_scan($directory, ..)
{
set_time_limit (1);
if (is_dir($new_file))
{
rec_scan ($new_file, )
}
}
The w
On Wed, 2009-08-05 at 14:18 -0500, Shawn McKenzie wrote:
> So, obviously not PHP related, but I'm looking for thoughts on the best
> way to record time sheets in a DB. A time sheet for hours worked per
> day, not like a time clock where you start and stop.
>
> The two possibilities that I have th
You don't mention what DB you're using, but mySQL can be quite a pain when
dealing with multiple time zones. Not impossible, but a hassle none the
less. Be sure to set aside a place to store this (and another spot for user
preferences to keep track of their TZ).
Jerry Wilborn
jerrywilb...@gmail.com
Shawn McKenzie wrote:
> So, obviously not PHP related, but I'm looking for thoughts on the best
> way to record time sheets in a DB. A time sheet for hours worked per
> day, not like a time clock where you start and stop.
>
> The two possibilities that I have thought of are (these are sim
On 3/19/07, Alain Roger <[EMAIL PROTECTED]> wrote:
Hi,
I've already seen some webpages which include a time or date picker (like a
calendar) written in PHP and on which user could type the year and after,
select the month and date (using month).
I'm looking for something like that.
Where can i
On Mon, March 19, 2007 2:11 pm, Alain Roger wrote:
> I've already seen some webpages which include a time or date picker
> (like a
> calendar) written in PHP and on which user could type the year and
> after,
> select the month and date (using month).
> I'm looking for something like that.
>
> Wher
At 8:11 PM +0100 3/19/07, Alain Roger wrote:
Hi,
I've already seen some webpages which include a time or date picker (like a
calendar) written in PHP and on which user could type the year and after,
select the month and date (using month).
I'm looking for something like that.
Where can i find o
I am interested in finding out what standards/formulas other PHP
programmers/departments out there are using to accurately provide time
estimates on modules to their PM's/Clients.
Any suggested reading books or sites?
Do time estimate theories in other langauges apply to web and php
programming
Diana Castillo wrote:
Is there anyway to set a time out on this command:
mysql_connect($host, $UN, $PW);
so that if it can´t connect after a certain amount of time, it returns an
error and the program continues?
ini_set('mysql.connect_timeout', ... );
--
PHP General Mailing List (http://www.php.n
Hello,
a have this problem. I am reading some data from another server via
http-conection for which I have used fsock_open. But sometimes, it is
possible, that reading is longer, than for example 5 seconds, and I want to
stop this reading a return false...
I found function set_time_limit, whi
Karam Chand wrote:
In Win32 API to profile a job we use the following
method:
timetaken = GetTickCount();
/* do some job */
timetaken = GetTickCount() - timetaken;
In this way timetaken returns you the time taken by
the job to complete?
How can I get it in PHP. I want the exact figure in
ms? I u
Darn missed it. Looking into the docs I am using code
somthing like this:
$start = microtime();
$result = mysql_query ( $query, $mysql );
$end = microtime();
$diff = microtime_diff ($start, $end);
function microtimdiff() is given by:
function microtime_
Karam Chand wrote:
Darn missed it. Looking into the docs I am using code
somthing like this:
If you are really keen about chaning +1 to ++ and double quotes to
single quotes in the hope of shaving off a few milliseconds in execution
time you might want to try something like xdebug.
--
Radith
I'm using a single php script to send files named upload.php,
here is the source code:
set_time_limit(500);
copy($userfile, "log\\$userfile_name");
echo "Uploading file...http://test.com/file_sent.html\";>Uploading
file...";
?>
I've tried to change the "time limit" because there's an error
f the MySQL manual for Date and Time Functions for
examples...
---John Holmes...
> -Original Message-
> From: Peter [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 24, 2002 5:05 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Time/date function MYSQL->UNIX
>
> Is there
have a look at date_format in the mysql help and pull your sate filed out as
a date
Steve
> -Original Message-
> From: Jack [mailto:[EMAIL PROTECTED]]
> Sent: 12 July 2001 21:04
> To: [EMAIL PROTECTED]
> Subject: [PHP] time compare in my sql
>
>
> Hi folks
Hi,
I'm trying to find a function doing the time conversion from iso8601 to
unixtime.
http://www.w3.org/TR/NOTE-datetime
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administ
Hi!
Is there a way to get the time the database needed for execution a statement?
I use MySQL and PHP...
--
Berthold Tenhumberg
(live long and prosper...)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE
Clancy wrote:
> I have a recursive procedure, and I set the time limit each time I
> enter it:
>
> function rec_scan($directory, ..)
> {
> set_time_limit (1);
>
> if (is_dir($new_file))
> {
> rec_scan ($new_file, )
> }
>
> }
>
>
> The way I read the manual, the timer should be reset e
On Sun, 07 Jun 2009 13:04:20 +0200, p...@computer.org (Per Jessen) wrote:
>Clancy wrote:
>
>> I have a recursive procedure, and I set the time limit each time I
>> enter it:
>>
>> function rec_scan($directory, ..)
>> {
>> set_time_limit (1);
>>
>> if (is_dir($new_file))
>> {
>> rec_scan ($ne
Hey everybody,
I've got a strange problem. Using PHP5.3 on my MacBook.
There is a script, which handles input from user, in this case a date
and time.
So I get for example "10:30" and "06.10.2009". Standard german time
format. Now I try to get the correct timestamp:
$time = strtotime("06
I'm using PHP 5.2.6; I just updated timezones with PECL timezonedb to make
sure that wasn't the problem.
These are the results that I'm getting, which I cannot figure out:
date_default_timezone_set("America/New_York");
echo date("e"); //output "America/New_York"
echo date("T"); //output "CST"
da
Help. I'm using PayPal's API to get a report of all the yesterday's
transactions. I'm in California, and I define "yesterday" as California's
yesterday, midnight to midnight.
PayPal wants the STARTDATE and ENDDATE provided in UTC/GMT. I'm building and
testing my report using this:
$start = gmd
On 31/01/2012, at 2:55 PM, Ron Piggott wrote:
>
> On my clients account when I use “echo date(‘D, d M Y H:i:s');” the output is
> 5 hours ahead of us. How do I change it to my local time? Is there a way to
> specify “Eastern” time zone?
>
> I expect this would work:
>
> echo date(‘D, d M Y
Hello people.
Argentina changed timezones (Oct 19th), just two weeks ago, and, as PHP
has a separate table, I forgot to change the zones both in my machine and
on the server. I did so yesterday, and have some problems. Here's what I
did:
1) Downloaded the latest timezonedb (2008.9), compiled and
At 11:10 AM 2/1/2006, Mark Steudel wrote:
I am interested in finding out what standards/formulas other PHP
programmers/departments out there are using to accurately provide time
estimates on modules to their PM's/Clients.
Any suggested reading books or sites?
Highly recommended:
Web Redesign
I'm using a simple php script called upload.php, here's the source:
move_uploaded_file($userfile, "/my/dir");
?>
But I keep getting an error message:
Fatal error: Maximum execution time of 20 seconds exceeded in
D:\dominios\E\escolas-es\spe\upload.php on line 3
Then, I've tried to increase
Ok - the scenario:
I have a box that I lease... I have root privs, so I can do almost anything
I want to it. Almost being the key word. Unfortunately, any time I try to
upgrade a base library, I snafu the thing, and the datacenter has to rebuild
the libraries.
Right now, I've got php4.0.4pl1 t
www.phpbeginner.com
-Original Message-
From: B. Tenhumberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 5:44 PM
To: PHP General
Cc: MySQL
Subject: [PHP] Time needed for a SQL-statement
Hi!
Is there a way to get the time the database needed for execution a
statement?
"B. Tenhumberg" schrieb:
> Is there a way to get the time the database needed for execution a statement?
> I use MySQL and PHP...
Hmm, how about metering the overall time required by mysql_query() using
microtime(), http://www.php.net/manual/en/function.microtime.php. As
long as there's no netw
Hi,
That's because %m is month, what you need is %M for minute (note uppercase).
Check out http://php.net/strftime
HTH
J
-Original Message-
From: Matthias Laug [mailto:matthias.l...@gmail.com]
Sent: 06 October 2009 08:53
To: php-general@lists.php.net
Subject: [PHP] Time Pr
You also write the answer
var_dump(strftime("%d.%m.%Y %H:%m",$time));
there are 2 %m you see? %m is month :)
for minute use %i
-Original Message-
From: Matthias Laug [mailto:matthias.l...@gmail.com]
Sent: Tuesday, October 06, 2009 10:53 AM
To: php-general@lists.php.net
Sub
thias Laug [mailto:matthias.l...@gmail.com]
Sent: Tuesday, October 06, 2009 10:53 AM
To: php-general@lists.php.net
Subject: [PHP] Time Problem: always ten past xx
Hey everybody,
I've got a strange problem. Using PHP5.3 on my MacBook.
There is a script, which handles input from user, in this case
, October 06, 2009 11:04 AM
To: 'Matthias Laug'; php-general@lists.php.net
Subject: RE: [PHP] Time Problem: always ten past xx
Hi,
That's because %m is month, what you need is %M for minute (note uppercase).
Check out http://php.net/strftime
HTH
J
-Original Message-
From
g'; php-general@lists.php.net
Subject: RE: [PHP] Time Problem: always ten past xx
Jason,
%M is also month:
Month --- ---
F A full textual representation of a month, such as January or March January
through December
m Numeric representation of a month, with leading zeros 01 through
m.tr]
Sent: 06 October 2009 09:07
To: 'Jason'; 'Matthias Laug'; php-general@lists.php.net
Subject: RE: [PHP] Time Problem: always ten past xx
Jason,
%M is also month:
Month --- ---
F A full textual representation of a month, such as January or March January
through December
On 10/6/09 4:16 AM, "Mert Oztekin" wrote:
> My mistake,
>
> I thought it was date() now strftime()
> Sorry
>
> (why do php developers create two different standarts for such similiar
> functions???☺ )
>
it's traditional to do so. it reminds me of the bit about subtly
incompatible shells in un
At 10:07 AM +0200 10/6/09, Matthias Laug wrote:
argh, why do I always stick to the stupid questions :( sorry
Because with the important questions, you don't need answers. You
understand them.
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
On 29 June 2011 17:09, Brian Dunning wrote:
> Help. I'm using PayPal's API to get a report of all the yesterday's
> transactions. I'm in California, and I define "yesterday" as California's
> yesterday, midnight to midnight.
>
> PayPal wants the STARTDATE and ENDDATE provided in UTC/GMT. I'm bui
On Wed, 29 Jun 2011, Brian Dunning wrote:
$start = gmdate('Y-m-d\TH:i:s.00\Z', strtotime("yesterday 00:00:00"));
$end = gmdate('Y-m-d\TH:i:s.00\Z', strtotime("yesterday 23:59:59"));
I think this is right, since it's 7 hours off California time, but I
just need someone to double check my spinn
On Wed, 29 Jun 2011, Richard Quadling wrote:
And UTC is not the same as GMT. Ish.
GMT is only valid for 6 months of the year. Then, due to DST, it becomes BST.
UTC is just UTC.
This is incorrect. For all practical purposes, GMT and UTC are the same.
The fact that the time in Greenwich is n
Thanks everyone. It seems to be working correctly. You gave me some extra peace
of mind. I did set the date_default_timezone_set('America/Los_Angeles') but it
looks like that was in the defaults anyway. :-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.n
On Wed, 29 Jun 2011, Brian Dunning wrote:
Thanks everyone. It seems to be working correctly. You gave me some
extra peace of mind. I did set the
date_default_timezone_set('America/Los_Angeles') but it looks like that
was in the defaults anyway. :-)
It probably is if this is where your site
what does time();
$t1 = time();
{
do something
}
$t2 = time();
$end_time = $t2 - $t1;
echo $end_time;
what does $end_time represent?
how do you determine the next 5 mins?
--
Best Wishes
willandy.co.uk
$mydate = "20030328231154";
$myPrintDate=date ("l dS of F Y h:i:s A",$mydate);
echo "$myPrintDate";
Whats wrong
--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
People!
Someone can tell me if PHP 4 closes their connections to the DB
automatically at the end of the script?
Or I need to use the mssql_close function each time my work is done?
Best Regards!
Marcos Mathias
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL P
On 29 Jun 2011 at 17:25, Richard Quadling wrote:
> And UTC is not the same as GMT. Ish.
Yes it is.
> GMT is only valid for 6 months of the year. Then, due to DST, it becomes BST.
No, the UK is on GMT for 5 months a year and then on BST (GMT+1) for 7 months.
--
Cheers -- Tim
--
PHP Gener
2009/3/30 Andrew Williams :
> what does time();
>
> $t1 = time();
>
> {
>
> do something
> }
> $t2 = time();
>
> $end_time = $t2 - $t1;
> echo $end_time;
>
> what does $end_time represent?
The number of seconds it took to "do something".
> how do you determine the next 5 mins?
Assuming you mean
2009/3/30 Andrew Williams :
> what does time();
>
> $t1 = time();
>
> {
>
> do something
> }
> $t2 = time();
>
> $end_time = $t2 - $t1;
> echo $end_time;
>
> what does $end_time represent?
$end_time is not a great name for it: it's the time (number of
seconds) it took to go from $t1 to $t2. $durat
When someone does that, it means the execution time between $t1 and $t2...
Att,
Igor Escobar
systems analyst & interface designer
www . igorescobar . com
On Mon, Mar 30, 2009 at 7:38 AM, Richard Heyes wrote:
> 2009/3/30 Andrew Williams :
> > what does time();
> >
> > $t1 = time();
> >
> > {
>
> When someone does that, it means the execution time between $t1 and $t2...
Is that for my benefit? Believe it or not, I do know the arcane art of
subtraction...
--
Richard Heyes
HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated March 14th)
--
PHP Ge
On Mon, Mar 30, 2009 at 10:47 AM, Richard Heyes wrote:
>> When someone does that, it means the execution time between $t1 and $t2...
>
> Is that for my benefit? Believe it or not, I do know the arcane art of
> subtraction...
I would subtract more often, but sacrificial farm animals and black
cand
On Mon, Mar 30, 2009 at 12:05 PM, haliphax wrote:
> On Mon, Mar 30, 2009 at 10:47 AM, Richard Heyes wrote:
> >> When someone does that, it means the execution time between $t1 and
> $t2...
> >
> > Is that for my benefit? Believe it or not, I do know the arcane art of
> > subtraction...
>
> I wou
On Mon, Mar 30, 2009 at 11:37 AM, Igor Escobar wrote:
> The people use that to measure performance.
>
> If you're intersted about that read
> http://www.igorescobar.com/blog/2009/03/05/benchmarking-de-desempenho-no-php/
> (in portuguese, sorry)
>
> Regards,
> Igor Escobar
>
> On Mon, Mar 30, 2009
Okey, but you understand the purpouse of it?
Igor Escobar
systems analyst & interface designer
www . igorescobar . com
On Mon, Mar 30, 2009 at 3:42 PM, haliphax wrote:
> On Mon, Mar 30, 2009 at 11:37 AM, Igor Escobar
> wrote:
> > The people use that to measure performance.
> >
> > If you're
On Mon, Mar 30, 2009 at 1:51 PM, Igor Escobar wrote:
> Okey, but you understand the purpouse of it?
>
> On Mon, Mar 30, 2009 at 3:42 PM, haliphax wrote:
>>
>> On Mon, Mar 30, 2009 at 11:37 AM, Igor Escobar
>> wrote:
>> > The people use that to measure performance.
>> >
>> > If you're intersted a
Andrew Williams wrote:
> what does time();
>
> $t1 = time();
>
> {
>
> do something
> }
> $t2 = time();
>
> $end_time = $t2 - $t1;
> echo $end_time;
>
> what does $end_time represent?
>
> how do you determine the next 5 mins?
So if you haven't deduced the answer from other replies, this woul
On Mon, Mar 30, 2009 at 3:35 PM, Shawn McKenzie wrote:
> Andrew Williams wrote:
>> what does time();
>>
>> $t1 = time();
>>
>> {
>>
>> do something
>> }
>> $t2 = time();
>>
>> $end_time = $t2 - $t1;
>> echo $end_time;
>>
>> what does $end_time represent?
>>
>> how do you determine the next 5 mins?
> $mydate = "20030328231154";
>
> $myPrintDate=date ("l dS of F Y h:i:s A",$mydate);
>
> echo "$myPrintDate";
>
> Whats wrong
$mydate should be a unix style timestamp not a MMDDHHMMSS type
date/time format...
Check the functions time() and mktime() to help you generate unix
timestamps.
HTH
R
On 28/3/03 11:44 am, "Philip J. Newman" <[EMAIL PROTECTED]> wrote:
> $mydate = "20030328231154";
>
> $myPrintDate=date ("l dS of F Y h:i:s A",$mydate);
>
> echo "$myPrintDate";
>
> Whats wrong
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/un
Marcos Mathias pressed the little lettered thingies in this order...
> People!
>
> Someone can tell me if PHP 4 closes their connections to the DB
> automatically at the end of the script?
> Or I need to use the mssql_close function each time my work is done?
>
> Best Regards!
>
From:
http://
Greetings,
I've looked through a number of different archived threads (some
rather heated) and samples as well, but clearly I'm just missing
something.
PHP 5.1.6
CentOS release 5.5 (Final)
My server is in Central Time (US). We do observe DST. I noticed
functions like strftime() display UTC time.
Hi,
How can use time out mechanism in PHP when calling socket_recvfrom or
socket_read (in block service)?
I know the non-block system call can be used, but I need to use a
block system call, the block socket_recvfrom or socket_read should be
either returned to be failed, or canceled when a time o
On Mon, Nov 1, 2010 at 12:54 PM, Dan Yost wrote:
> Greetings,
>
> I've looked through a number of different archived threads (some
> rather heated) and samples as well, but clearly I'm just missing
> something.
>
> PHP 5.1.6
> CentOS release 5.5 (Final)
>
> My server is in Central Time (US). We d
On Tue, Nov 2, 2010 at 12:29 AM, Nathan Nobbe wrote:
> a few thoughts,
> 1. set error_reporting to E_ALL to see if the engine is trying to tell you
> something you may be overlooking
Sorry, failed to mention that I did this, and it says nothing.
> 2. for grins, maybe see if the TZ environment
On Tue, Nov 2, 2010 at 7:52 AM, Dan Yost wrote:
>
>
> So now I suppose the thread becomes: how do I get a valid US/Central
> (America/Chicago) timezone in PHP5?
>
give the timezonedb extension a shot
http://pecl.php.net/package/timezonedb
-nathan
On Tue, Nov 2, 2010 at 9:19 AM, Nathan Nobbe wrote:
> On Tue, Nov 2, 2010 at 7:52 AM, Dan Yost wrote:
>>
>> So now I suppose the thread becomes: how do I get a valid US/Central
>> (America/Chicago) timezone in PHP5?
>
> give the timezonedb extension a shot
> http://pecl.php.net/package/timezonedb
On Tue, Nov 2, 2010 at 8:44 AM, Dan Yost wrote:
> On Tue, Nov 2, 2010 at 9:19 AM, Nathan Nobbe
> wrote:
> > On Tue, Nov 2, 2010 at 7:52 AM, Dan Yost wrote:
> >>
> >> So now I suppose the thread becomes: how do I get a valid US/Central
> >> (America/Chicago) timezone in PHP5?
> >
> > give the ti
On Tue, Nov 2, 2010 at 11:02 AM, Nathan Nobbe wrote:
>> >>
>> >> So now I suppose the thread becomes: how do I get a valid US/Central
>> >> (America/Chicago) timezone in PHP5?
>> >
>> > give the timezonedb extension a shot
>> > http://pecl.php.net/package/timezonedb
>>
>>
>> Tried it, no change. I
On Tue, Nov 2, 2010 at 10:11 AM, Dan Yost wrote:
> On Tue, Nov 2, 2010 at 11:02 AM, Nathan Nobbe
> wrote:
> >> >>
> >> >> So now I suppose the thread becomes: how do I get a valid US/Central
> >> >> (America/Chicago) timezone in PHP5?
> >> >
> >> > give the timezonedb extension a shot
> >> > htt
On Tue, Nov 2, 2010 at 10:37 AM, Nathan Nobbe wrote:
> dude at this point i dont want to sound too much like a troll, but php 5.1
> is some really old software. frankly this is why i chose not to run on
> centos during my evaluation of it. i understand the concept behind running
> proven stable
On Tue, Nov 2, 2010 at 11:37 AM, Nathan Nobbe wrote:
> dude at this point i dont want to sound too much like a troll, but php 5.1
> is some really old software. frankly this is why i chose not to run on
> centos during my evaluation of it. i understand the concept behind running
> proven stable
201 - 280 of 280 matches
Mail list logo