Re: [PHP] Date function kill lots time !

2012-01-05 Thread xucheng
yes,it is set in php.ini . 2012/1/5 Adam Richardson simples...@gmail.com On Wed, Jan 4, 2012 at 11:07 PM, xucheng helloworldje...@gmail.comwrote: hi all, I have a webapp which track visitors, and use xhprof for profiling my codes . After reading some reports produced by xhprof, i found

[PHP] Date function kill lots time !

2012-01-04 Thread xucheng
hi all, I have a webapp which track visitors, and use xhprof for profiling my codes . After reading some reports produced by xhprof, i found that function Date() kills most time of my app ! how can this happen ? Is this function has some internal issue that i should kown ? Any comment

Re: [PHP] Date function kill lots time !

2012-01-04 Thread Adam Richardson
On Wed, Jan 4, 2012 at 11:07 PM, xucheng helloworldje...@gmail.com wrote: hi all, I have a webapp which track visitors, and use xhprof for profiling my codes . After reading some reports produced by xhprof, i found that function Date() kills most time of my app ! how can this happen ?

Re: [PHP] Date Function

2008-02-23 Thread Richard Heyes
$start_date = date(Y-m-d h:i:s, strtotime($date_format)); echo $start_date; ? output is 2008-02-22 02:00:00 but not 2008-02-22 14:00:00 How can i get my output as 2008-02-22 14:00:00. Use H instead of h. And try the manual. -- Richard Heyes http://www.phpguru.org Free PHP and Javascript

[PHP] Date Function

2008-02-22 Thread VamVan
Hi All, Greetings!! A small PHP Script for help ?php $date_format = '02/22/2008 14:00:00'; $start_date = date(Y-m-d h:i:s, strtotime($date_format)); echo $start_date; ? output is 2008-02-22 02:00:00 but not 2008-02-22 14:00:00 How can i get my output as 2008-02-22 14:00:00. Thanks V --

Re: [PHP] Date Function

2008-02-22 Thread Andrew Ballard
On Fri, Feb 22, 2008 at 2:48 PM, VamVan [EMAIL PROTECTED] wrote: Hi All, Greetings!! A small PHP Script for help ?php $date_format = '02/22/2008 14:00:00'; $start_date = date(Y-m-d h:i:s, strtotime($date_format)); echo $start_date; ? output is 2008-02-22 02:00:00 but not

Re: [PHP] Date Function

2008-02-22 Thread Zoltán Németh
2008. 02. 22, péntek keltezéssel 11.48-kor VamVan ezt írta: Hi All, Greetings!! A small PHP Script for help ?php $date_format = '02/22/2008 14:00:00'; $start_date = date(Y-m-d h:i:s, strtotime($date_format)); $start_date = date(Y-m-d H:i:s, strtotime($date_format)); RTFM:

RES: [PHP] Date Function

2008-02-22 Thread Thiago Pojda
$start_date = date(Y-m-d H:i:s, strtotime($date_format)); echo $start_date; ? capital H should do it -Mensagem original- De: VamVan [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 22 de fevereiro de 2008 16:48 Para: php-general@lists.php.net Assunto: [PHP] Date Function Hi All

Re: [PHP] Date Function ][Resolved]

2008-02-22 Thread VamVan
: sexta-feira, 22 de fevereiro de 2008 16:48 Para: php-general@lists.php.net Assunto: [PHP] Date Function Hi All, Greetings!! A small PHP Script for help ?php $date_format = '02/22/2008 14:00:00'; $start_date = date(Y-m-d h:i:s, strtotime($date_format)); echo $start_date

RE: [PHP] date() function

2006-11-15 Thread Ivo F.A.C. Fokkema
On Tue, 14 Nov 2006 15:11:56 -0500, Brad Fuller wrote: $prevminute = sprintf('%02s', date(i)-1); Or, $prevminute = str_pad(date(i)-1, 2, '0', STR_PAD_LEFT); It's a little more code - don't ask me about the speed :) Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] date() function

2006-11-14 Thread Ashley M. Kirchner
I noticed that if I do something like this: $prevminute = date(i)-1; ..and the current minute happens to be '05', $prevminute becomes '4' - I lose the padding. How can I ensure that I retain that padding? I suppose a crud solution is to run $prevminute through an if loop to see

RE: [PHP] date() function

2006-11-14 Thread Brad Fuller
$prevminute = sprintf('%02s', date(i)-1); -Original Message- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 14, 2006 1:17 PM To: PHP General List Subject: [PHP] date() function I noticed that if I do something like this: $prevminute

Re: [PHP] Date Function Questions

2005-12-12 Thread Jesús Fernández
the date taken is the same as the local time of the webserver. So if it changes that maybe the server admin's are changing it? -- http://esu.proyectoanonimo.com http://www.proyectoanonimo.com

[PHP] Date Function Questions

2005-12-11 Thread [EMAIL PROTECTED]
This maybe a dumb questions, but in php where is the information taken from for the date() function? Is it pulled through Apache or the hardware or in the php.ini file? I am having an issue to where the time arbitraly changed one day from PST to CST.

[PHP] R: [PHP] Date Function Questions

2005-12-11 Thread Sebastian \En3pY\ Zdrojewski
utilizzo improprio è contrario ai principi del D.lgs 196/03 e alla legislazione Europea (Direttiva 2002/58/CE). -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: lunedì 12 dicembre 2005 6.57 A: PHP-General Oggetto: [PHP] Date Function Questions This maybe

[PHP] Re: R: [PHP] Date Function Questions

2005-12-11 Thread [EMAIL PROTECTED]
- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: lunedì 12 dicembre 2005 6.57 A: PHP-General Oggetto: [PHP] Date Function Questions This maybe a dumb questions, but in php where is the information taken from for the date() function? Is it pulled through Apache or the hardware

RE: [PHP] Re: R: [PHP] Date Function Questions

2005-12-11 Thread Matt Babineau
(Direttiva 2002/58/CE). -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: lunedì 12 dicembre 2005 6.57 A: PHP-General Oggetto: [PHP] Date Function Questions This maybe a dumb questions, but in php where is the information taken from

Re: [PHP] Date function and MySQL

2005-07-20 Thread kalinga
this seems pretty interesting, i'm tring to write a code in php to get those two outputs, but bit confused in counting weeks. could somebody clear me.. what is the first *date* of the first week of year 2005? is it saturday jan 1st 2005 (assuming first week starts from jan 1 of any year) or is

Re: [PHP] Date function and MySQL

2005-07-20 Thread kalinga
Hi all. I have the week number (for example, this is the 29th week of the year and it begins on 7/17/05). Does anyone know how to obtain the first (and maybe the last) date of the week if you only know the week number of the year? Would it be better for me to obtain this in PHP

Re: [PHP] Date function and MySQL

2005-07-19 Thread Arno Coetzee
Philip Thompson wrote: Hi all. I have the week number (for example, this is the 29th week of the year and it begins on 7/17/05). Does anyone know how to obtain the first (and maybe the last) date of the week if you only know the week number of the year? Would it be better for me to

[PHP] Date function and MySQL

2005-07-18 Thread Philip Thompson
Hi all. I have the week number (for example, this is the 29th week of the year and it begins on 7/17/05). Does anyone know how to obtain the first (and maybe the last) date of the week if you only know the week number of the year? Would it be better for me to obtain this in PHP or MySQL?

[PHP] date() function help

2005-03-16 Thread John Eggen
I am writing an application to allow users to enter weekly data and am storing the data based on the year and the ISO week number. The data will be reported on a monthly basis and therefore I need a way to find the ISO week number for the first full week of the month (Monday-Sunday) and the ISO

[PHP] date function

2004-09-19 Thread Magdy
Hi, i'm pleasure to write to u and hope to finde an answer.. my problem is with date( ) function which is display a GMT time which is different from my zone with 3 hours,,,how can i correct this. Thanks in advance. Magdy

Re: [PHP] date function

2004-09-19 Thread Jordi Canals
On Sun, 19 Sep 2004 14:29:54 +0300, Magdy [EMAIL PROTECTED] wrote: my problem is with date( ) function which is display a GMT time which is different from my zone with 3 hours,,,how can i correct this. The date() function, gets the system current date/time if you don't pass the second

[PHP] Date Function - Empty Value

2004-05-19 Thread Gabe
Environment: PHP 4.3.6 Access DB W2K IIS 5 I'm trying to store a date in a date/time field using the short date format ( m/d/ ). For some reason it won't let me post an empty value to that field in the DB. I've tried using empty quotes ( ) or NULL and I always get a datatype mismatch sql

[PHP] Date function

2004-03-05 Thread Jason Baker
Hello, I am new to using the date function. I am in the need of a script that changes an image on a web page on the first day of each month and keeps the image there until the first day of the next month. I have tried to look for something that could come close but still didnt work. Can you

Re: [PHP] Date function

2004-03-05 Thread Richard Davey
Hello Jason, Friday, March 5, 2004, 1:51:57 PM, you wrote: JB Hello, I am new to using the date function. I am in the need of a JB script that changes an image on a web page on the first day of each JB month and keeps the image there until the first day of the next month. JB I have tried to

RE: [PHP] date() function doesn't seem to work right...

2003-12-02 Thread Wouter van Vliet
On maandag 1 december 2003 21:04 Curt Zirzow told the butterflies: * Thus wrote Scott Fletcher ([EMAIL PROTECTED]): When I do this script, I didn't get a : and numbers in second. --snip-- date(Y-m-d H:i:s); --snip-- works fine with phpversion() 4.2.2 Curt -- If eval() is the

[PHP] date() function doesn't seem to work right...

2003-12-01 Thread Scott Fletcher
Hi Everyone!!! I noticed that date() function act a little funny, so I am wondering if anyone of you have noticed this problem or not. I'm just curious because I wanna know if it is my issue or is it a general issue for everyone. I'm using PHP version 4.2.3 on Unix machine. Please don't

RE: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Jay Blanchard
[snip] When I do this script, I didn't get a : and numbers in second. --snip-- date(Y-m-d H:i:s); --snip-- [/snip] When I cut and paste your code (PHP v 4.3.n) it works OK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Thijs Lensselink
Scott Fletcher wrote on maandag 1 december 2003 16:41: When I do this script, I didn't get a : and numbers in second. : --snip-- : date(Y-m-d H:i:s); : --snip-- : : But when I do this script by adding a period to it, it worked : okay. --snip-- : date(Y-m-d H:i:s.); : --snip-- : : Thanks, :

Re: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Scott Fletcher
Okay thanks... I'll do a workaround for now until PHP get upgraded in the near future. Thijs Lensselink [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Scott Fletcher wrote on maandag 1 december 2003 16:41: When I do this script, I didn't get a : and numbers in second. : --snip--

Re: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Chris Shiflett
--- Scott Fletcher [EMAIL PROTECTED] wrote: When I do this script, I didn't get a : and numbers in second. --snip-- date(Y-m-d H:i:s); --snip-- But when I do this script by adding a period to it, it worked okay. --snip-- date(Y-m-d H:i:s.); --snip-- Either this is a bug, or you're

Re: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]): When I do this script, I didn't get a : and numbers in second. --snip-- date(Y-m-d H:i:s); --snip-- works fine with phpversion() 4.2.2 Curt -- If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus

Re: [PHP] date() function and timestamps

2003-07-04 Thread Jeff Harris
On Jul 3, 2003, Garrick Linn claimed that: |Hello all, | |I seem to be running into a problem where the date() function appears not |to differentiate properly between unix timestamps. | |For example, the code: | |?php | |$seconds = 1054278483; |echo $secondsbr; |echo date(d-m-Y H:m:s, $seconds);

[PHP] date() function and timestamps

2003-07-03 Thread Garrick Linn
Hello all, I seem to be running into a problem where the date() function appears not to differentiate properly between unix timestamps. For example, the code: ?php $seconds = 1054278483; echo $secondsbr; echo date(d-m-Y H:m:s, $seconds); echo brbr; $seconds = ($seconds - 60); echo $secondsbr;

Re: [PHP] date() function and timestamps

2003-07-03 Thread Philip Olson
:) You are using an m where you want an i. Regards, Philip On Thu, 3 Jul 2003, Garrick Linn wrote: Hello all, I seem to be running into a problem where the date() function appears not to differentiate properly between unix timestamps. For example, the code: ?php $seconds =

[PHP] Date Function in Php

2002-05-15 Thread Vinod Palan
hi , Do any one have date functions like that we have in asp 1) Dateadd() 2) Datediff() etc? Thanks Vinod -- Vinod Palan A Calypso Technology, Inc. [EMAIL PROTECTED] (415) 817-2463 Phone -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date Function in Php

2002-05-15 Thread Miguel Cruz
On Wed, 15 May 2002, Vinod Palan wrote: Do any one have date functions like that we have in asp 1) Dateadd() 2) Datediff() etc? You might be able to get what you need with strtotime, which is a marvelous thing. See: http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html The rest of

[PHP] Date function

2002-04-19 Thread Alia Mikati
Hello I have the following SQL and I wanna insert the current date in one of the table fields but it's not working. Can u tell me whats the problem? (I'm using mysql and php) Thx a lot $SQL = INSERT INTO orders (Customer_Id, Order_Date). VALUES($CustID,date()); --

Re: [PHP] Date function

2002-04-19 Thread Danny Shepherd
()); // uses MySQL's builtin date function to store the current date. HTH, Danny. - Original Message - From: Alia Mikati [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 19, 2002 10:28 AM Subject: [PHP] Date function Hello I have the following SQL and I wanna insert the current date

[PHP] date( ) - function

2002-02-05 Thread soma
i have one question linux system's time is right but php's date () function time is wrong... different system time and php's date( ) time is date () function call to the system time ? thansk /soma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] date( ) - function

2002-02-05 Thread Mike Maltese
try date(H:i:s,time()). Mike - Original Message - From: soma [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 12:32 AM Subject: [PHP] date( ) - function i have one question linux system's time is right but php's date () function time is wrong

Re: [PHP] Date function

2002-01-28 Thread sundogcurt
Is this date stored in mysql by anychance? [EMAIL PROTECTED] wrote: Hi All, Is there any function in PHP4.X or in Oracle8i to calculate number of Business days ( excluding Saturday and Sunday) between two given dates? Thanks in advance. Sridhar. -Original Message- From: qartis

[PHP] Date function

2002-01-28 Thread Sridhar Moparthy
Hi All, Is there any function in PHP4.X or in Oracle8i to calculate number of Business days ( excluding Saturday and Sunday) between two given dates? Thanks in advance. Sridhar. -Original Message- From: qartis [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 1:38 PM To:

[PHP] Date function

2001-08-15 Thread Mike Mike
Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP

Re: [PHP] Date function

2001-08-15 Thread ReDucTor
: Thursday, August 16, 2001 1:08 AM Subject: [PHP] Date function Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike __ Do You Yahoo!? Make international calls for as low as $.04

Re: [PHP] Date function

2001-08-15 Thread Brian C. Doyle
I use $date = explode(-, $msql_date); $date = date(d F,mktime(0,0,0,$date[1],$date[2],$date[0])); At 08:08 AM 8/15/01 -0700, Mike Mike wrote: Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike

Re: [PHP] Date function

2001-08-15 Thread David Robley
On Thu, 16 Aug 2001 00:38, Mike Mike wrote: Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike You could use the Mysql date functions to format it for you. If your date field is called date and is a date type: SELECT

Re: [PHP] Date function

2001-08-15 Thread Don Read
On 16-Aug-2001 David Robley wrote: On Thu, 16 Aug 2001 00:38, Mike Mike wrote: Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike You could use the Mysql date functions to format it for you. If your date field is called