yes,it is set in php.ini .
2012/1/5 Adam Richardson
> On Wed, Jan 4, 2012 at 11:07 PM, xucheng 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
On Wed, Jan 4, 2012 at 11:07 PM, xucheng 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 ? Is this function ha
$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
2008. 02. 22, péntek keltezéssel 11.48-kor VamVan ezt írta:
> Hi All,
>
> Greetings!!
>
> A small PHP Script for help
>
> $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:
Thanks ALL who have replied
On Fri, Feb 22, 2008 at 11:55 AM, Thiago Pojda
<[EMAIL PROTECTED]> wrote:
>
> $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]
>
On Fri, Feb 22, 2008 at 2:48 PM, VamVan <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Greetings!!
>
> A small PHP Script for help
>
>$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
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 unsubscr
$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:
>
> $pre
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
> > > 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 obt
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
i
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 obtain
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 para
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
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
> --
>
* 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
--- 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
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.
> : -
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--
:
: Thank
[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
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:
|
|";
|echo date("d-m-Y H:m:s", $seconds);
|echo "";
|
|$seconds = ($seconds - 60);
|e
Doh! Gracias. :-)
At 11:58 PM 7/3/2003 +, Philip Olson wrote:
:)
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
:)
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:
>
>
> $seconds =
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
MySQL (I assume that's the database you're inserting into) requires dates to
be sent in -MM-DD format. You appear to be sending a unix timestamp.
Try:
date("Y-m-d",time()) // Sends a MySQL style date.
or even:
$SQL = "INSERT INTO orders (Customer_Id, Order_Date) VALUES($CustID,NOW())";
//
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.
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: qar
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
> fi
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 CO
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
>
>
- Original Message -
From: "Mike Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 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
>
> ___
31 matches
Mail list logo