$now=date("Y-m-d");
A = $mydata->birthday = 1928-02-12;
B = $mydata->birthday = 1965-03-18;
C = $mydata->birthday = 1976-04-11;
I'm doing a demographic sort.
How do I calculate whether $mydata->Birthday falls into these categories
below?
I'm working my way right now through the manual:
http:/
On Tue, Aug 24, 2010 at 00:37, Rick Pasotto wrote:
>
> http://us2.php.net/manual/en/datetime.formats.relative.php
Thank you, sir!
--
UNADVERTISED DEDICATED SERVER SPECIALS
SAME-DAY SETUP
Just ask me what we're offering today!
daniel.br...@parasane.net || danbr...@php.net
http://www.parasan
On Mon, Aug 23, 2010 at 11:38:41PM -0400, Daniel P. Brown wrote:
> On Mon, Aug 23, 2010 at 22:27, Rick Pasotto wrote:
> >
> > After I sent my original post the one and only user comment on the
> > relative date strings man page was pointed out to me. So, it's there but
> > how many people make a h
On Mon, Aug 23, 2010 at 22:27, Rick Pasotto wrote:
>
> After I sent my original post the one and only user comment on the
> relative date strings man page was pointed out to me. So, it's there but
> how many people make a habit of reading all the user comments?
A few thousand per day, give or
On Mon, Aug 23, 2010 at 05:57:28PM -0400, Daniel Brown wrote:
> On Mon, Aug 23, 2010 at 17:02, Ashley Sheridan
> wrote:
> >
> > The example you quote as being straight from the manual page is actually
> > from the user-submitted code snippets, and I can't find the
> > documentation to support it.
On Mon, Aug 23, 2010 at 17:02, Ashley Sheridan
wrote:
>
> The example you quote as being straight from the manual page is actually
> from the user-submitted code snippets, and I can't find the
> documentation to support it. I can only assume that it's possibly an
> experimental thing, or somethin
On Mon, 2010-08-23 at 16:04 -0400, Rick Pasotto wrote:
> On my home machine running 5.3.2-2 in debian linux the commands:
>
> echo date('Y-m-d',strtotime('first day of this month')).'';
> echo date('Y-m-d',strtotime('last day of next month'));
>
> give the expected results.
>
> I just got setup
On my home machine running 5.3.2-2 in debian linux the commands:
echo date('Y-m-d',strtotime('first day of this month')).'';
echo date('Y-m-d',strtotime('last day of next month'));
give the expected results.
I just got setup with a hosting provider running 5.2.13 on BSD and both
give '1969-12-31
On May 5, 2010, at 10:12 AM, Peter Lind wrote:
> On 5 May 2010 16:58, Philip Thompson wrote:
>> Hello all.
>>
>> Long time no see! Anyway, I'm having an issue with strtotime(). Why do the
>> following return valid timestamps?
>>
>> > echo strtotime ('a').': '.date ("m/d/Y", strtotime ('a')).""
On 5 May 2010 16:58, Philip Thompson wrote:
> Hello all.
>
> Long time no see! Anyway, I'm having an issue with strtotime(). Why do the
> following return valid timestamps?
>
> echo strtotime ('a').': '.date ("m/d/Y", strtotime ('a'))."";
> echo strtotime ('a,a').': '.date ("m/d/Y", strtotime ('
Hello all.
Long time no see! Anyway, I'm having an issue with strtotime(). Why do the
following return valid timestamps?
";
echo strtotime ('a,a').': '.date ("m/d/Y", strtotime ('a,a'))."";
echo strtotime ('a,a,a').': '.date ("m/d/Y", strtotime ('a,a,a'))."";
?>
These result in today's date:
1
Sent: Thursday, January 14, 2010 4:14 PM
To: php-general@lists.php.net
Subject: Re: [PHP] strtotime
On Thu, Jan 14, 2010 at 2:53 PM, Adam Richardson
wrote:
> I've not read this, but if the first valid date is Jan. 1st, 1970,
then
> passing that date back in the case of errors would lead
My thanks to all!
Adam Richardson wrote:
I've not read this, but if the first valid date is Jan. 1st, 1970,
then passing that date back in the case of errors would lead to
ambiguity. Is it a valid date or is it an error. Passing back the
date of the day just before (in terms of time, I think
On Thu, Jan 14, 2010 at 2:53 PM, Adam Richardson wrote:
> I've not read this, but if the first valid date is Jan. 1st, 1970, then
> passing that date back in the case of errors would lead to ambiguity. Is
> it
> a valid date or is it an error. Passing back the date of the day just
> before (in t
I've not read this, but if the first valid date is Jan. 1st, 1970, then
passing that date back in the case of errors would lead to ambiguity. Is it
a valid date or is it an error. Passing back the date of the day just
before (in terms of time, I think it's the second before) the first valid
date
Hi guys
I have a question:
Ashley Sheridan wrote on 14/01/2010 19:20:
MySQL uses a default "-00-00" value for date fields generally, but
when converted into a timestamp, the string equates to a false value. In
PHP, timestamps are numerical values indicating the seconds since
Midnight of the
When you set the date to "-00-00", you start the following sequence:
1. strtotime returns false, because "-00-00" isn't a date it can
parse into a timestamp.
2. date returns 1969, because it's not passed a valid timestamp and it
works from December 31, 1969 for any invalid dat
On Thu, 2010-01-14 at 13:14 -0500, John Taylor-Johnston wrote:
> Hello,
>
> In a mysql date() field, I set the default to "-00-00".
>
> Therefore, $mydata->birthday = "-00-00";
>
> But when I run this next line, $then = 1969.
>
> $then=date("Y", strtotime($mydata->birthday));
>
> Why
Hello,
In a mysql date() field, I set the default to "-00-00".
Therefore, $mydata->birthday = "-00-00";
But when I run this next line, $then = 1969.
$then=date("Y", strtotime($mydata->birthday));
Why 1969, and not 0 or nothing?
If I echo strtotime("-00-00");
Nothing appears. So
On 24/12/09 16:59, Bastien Koert wrote:
On Thu, Dec 24, 2009 at 9:12 AM, tedd wrote:
At 10:20 PM +1000 12/24/09, Angus Mann wrote:
Hi all. I need to allow users to enter dates and times, and for a while
now I've been forcing them to use javascript date/time pickers so I can be
absolutely sure
On Thu, Dec 24, 2009 at 9:12 AM, tedd wrote:
> At 10:20 PM +1000 12/24/09, Angus Mann wrote:
>>
>> Hi all. I need to allow users to enter dates and times, and for a while
>> now I've been forcing them to use javascript date/time pickers so I can be
>> absolutely sure the formatting is correct.
>>
At 10:20 PM +1000 12/24/09, Angus Mann wrote:
Hi all. I need to allow users to enter dates and times, and for a
while now I've been forcing them to use javascript date/time pickers
so I can be absolutely sure the formatting is correct.
Some users are requesting to be able to type the entries t
On Thu, Dec 24, 2009 at 13:20, Angus Mann wrote:
> Hi all. I need to allow users to enter dates and times, and for a while now
> I've been forcing them to use javascript date/time pickers so I can be
> absolutely sure the formatting is correct.
>
> Some users are requesting to be able to type th
Hi all. I need to allow users to enter dates and times, and for a while now
I've been forcing them to use javascript date/time pickers so I can be
absolutely sure the formatting is correct.
Some users are requesting to be able to type the entries themselves so I've
decided to allow this.
I'm i
On Mon, Oct 5, 2009 at 12:15, Jim Lucas wrote:
>
> You stated that you are running PHP 5.2.10 , too bad the function recommend
> (locale_get_default()) is only available in PHP 5.3 or newer.
That's my fault entirely, not Floyd's. I didn't look to see what
version of PHP he was running.
--
Floyd Resler wrote:
> Well that's odd. locale_get_default() gave me an undefined function
> error. Apparently this year problem has been reported as a bug on
> bugs.php.net but the status for it (and everything else) is Bogus. I'm
> not sure if that means anything or not but hopefully a fix wil
Well that's odd. locale_get_default() gave me an undefined function
error. Apparently this year problem has been reported as a bug on bugs.php.net
but the status for it (and everything else) is Bogus. I'm not sure
if that means anything or not but hopefully a fix will be coming soon.
Th
On Sun, Oct 4, 2009 at 17:00, Floyd Resler wrote:
> Sorry to hear that! I live in Cincinnati so I normally don't get to watch
> the Colts play when they are on at the same time as the Bengals. But this
> week I did and, best of all, they won!
Yeah, well, the Browns sure didn't, so bite me.
Sorry to hear that! I live in Cincinnati so I normally don't get to
watch the Colts play when they are on at the same time as the
Bengals. But this week I did and, best of all, they won!
On Oct 4, 2009, at 3:24 PM, Eddie Drapkin wrote:
On Sun, Oct 4, 2009 at 3:22 PM, Floyd Resler
wrote:
On Sun, Oct 4, 2009 at 3:22 PM, Floyd Resler wrote:
> Yeah, the ;Y" was a typo in my email. That's what happens while trying to
> type while watching my Colts play!
>
> Thanks!
> Floyd
>
Go Colts!
At least you get to watch it, I have to follow along on sports sites!
--
PHP General Mailing List
n, October 4, 2009 12:01:30 PM
Subject: Re: [PHP] strtotime strangeness
I couldn't find anything in the php.ini file to account for this.
I am running
PHP 5.2.10. I've never actually updated it myself so the software
updater
updated it at some point. I did a little test and fo
- Original Message
> From: Floyd Resler
> To: Andrea Giammarchi
> Cc: php-general@lists.php.net
> Sent: Sun, October 4, 2009 12:01:30 PM
> Subject: Re: [PHP] strtotime strangeness
>
> I couldn't find anything in the php.ini file to account for this. I a
x-intl.com
> To: php-general@lists.php.net
> Date: Sun, 4 Oct 2009 14:05:05 -0400
> Subject: [PHP] strtotime strangeness
>
> For some reason the strtotime is no longer returning the year
> portion. For example, strtotime("10/04/2009") will result in a date
> of -10-0
Did the OS update changed the default locale settings or the default date
format?
> From: fres...@adex-intl.com
> To: php-general@lists.php.net
> Date: Sun, 4 Oct 2009 14:05:05 -0400
> Subject: [PHP] strtotime strangeness
>
> For some reason the strtotime is no longer
For some reason the strtotime is no longer returning the year
portion. For example, strtotime("10/04/2009") will result in a date
of -10-04. This started happening recently and I haven't done any
updates other than the normal OS updates. I am running Mac OS X
10.5.8. Does anyone hav
Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
allant sur le mois d'octobre, alors qu'en version 5: 19700101.
Merci de votre aide
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Greetings, Thodoris.
In reply to Your message dated Wednesday, October 8, 2008, 16:35:40,
Greetings to you too :-) .
From your function name I assume you want to use it in MySQL. In that
case, why don't you have MySQL do all the magic for you?
eg. INSERT INTO table (col) VALUES (FROM_UNI
Greetings, Thodoris.
In reply to Your message dated Wednesday, October 8, 2008, 16:35:40,
>> From your function name I assume you want to use it in MySQL. In that
>> case, why don't you have MySQL do all the magic for you?
>> eg. INSERT INTO table (col) VALUES (FROM_UNIXTIME($timestamp));
>> (usi
From your function name I assume you want to use it in MySQL. In that
case, why don't you have MySQL do all the magic for you?
eg. INSERT INTO table (col) VALUES (FROM_UNIXTIME($timestamp));
(using FROM_UNIXTIME($timestamp) will give you the date-time in "mysql
format" (-MM-DD HH:MM:SS)
Thodoris wrote:
Actually strtotime accepts all kinds of things... "Last week
Thursday midnight" for example works perfectly.
You could do an explode on the field and then reorder the array
anyway that you want...
Or something like that :)
That wasn't tested but should give you an idea
On Oct 8, 2008, at 7:58 AM, Thodoris wrote:
Actually strtotime accepts all kinds of things... "Last week
Thursday midnight" for example works perfectly.
You could do an explode on the field and then reorder the array
anyway that you want...
Or something like that :)
That wasn't te
On 8 Oct 2008, at 12:58, Thodoris wrote:
Actually this means that strtotime() was made with Americans *only*
in mind... :-) .
As far as I know it uses the configured timezone to decide between
ambiguous formats.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
Actually strtotime accepts all kinds of things... "Last week
Thursday midnight" for example works perfectly.
You could do an explode on the field and then reorder the array
anyway that you want...
Or something like that :)
That wasn't tested but should give you an idea...
php.net/expl
On Oct 8, 2008, at 7:08 AM, Thodoris wrote:
I know that *strtotime*() only recognises the formats mm/dd/,
-mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format = 'Y-m-d';
$timestamp = strtotime($webda
On Oct 8, 2008, at 7:24 AM, Thodoris wrote:
On Oct 8, 2008, at 7:08 AM, Thodoris wrote:
I know that *strtotime*() only recognises the formats mm/dd/,
-mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format = 'Y
On Oct 8, 2008, at 7:08 AM, Thodoris wrote:
I know that *strtotime*() only recognises the formats mm/dd/,
-mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format = 'Y-m-d';
$timestamp = strtotime($webdate);
I know that *strtotime*() only recognises the formats mm/dd/, -mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format = 'Y-m-d';
$timestamp = strtotime($webdate);
return date($format,$timestamp);
On 3/13/08, tedd <[EMAIL PROTECTED]> wrote:
> At 10:43 AM -0500 3/12/08, Greg Donald wrote:
> >No matter where we draw the borders or put the roads and highways,
> >it's still just the one planet, with the same finite resources we all
> >have to share. Being mad about globalization is pointless, i
On Thu, 2008-03-13 at 11:49 -0400, tedd wrote:
> At 10:43 AM -0500 3/12/08, Greg Donald wrote:
> >No matter where we draw the borders or put the roads and highways,
> >it's still just the one planet, with the same finite resources we all
> >have to share. Being mad about globalization is pointles
At 10:43 AM -0500 3/12/08, Greg Donald wrote:
No matter where we draw the borders or put the roads and highways,
it's still just the one planet, with the same finite resources we all
have to share. Being mad about globalization is pointless, it's
inevitable.
Not if you don't live on this plane
On 3/10/08, Wolf <[EMAIL PROTECTED]> wrote:
> Watch throwing that blame around there Greg, you get to thank the
> democrats for NAFTA and the hurting the heartlands
No matter where we draw the borders or put the roads and highways,
it's still just the one planet, with the same finite resources we
Greg Donald wrote:
Hey Rob,
Remember on 2007-09-18 at 22:45:37 when you suggested I do this:
http://marc.info/?l=php-general&m=119015558426248&w=2
Well.. today strtotime( 'last Sunday' ) screwed me and I'm writing to
say that I nearly fell out of my chair laughing when I realized what
the pro
Hey Rob,
Remember on 2007-09-18 at 22:45:37 when you suggested I do this:
http://marc.info/?l=php-general&m=119015558426248&w=2
Well.. today strtotime( 'last Sunday' ) screwed me and I'm writing to
say that I nearly fell out of my chair laughing when I realized what
the problem was, who caused i
I would use date and mktime, personally, as strtotime often does
things I consider "strange"
On Sun, February 10, 2008 5:46 am, Ron Piggott wrote:
>
> I am trying to calculate what was the date 18 months ago. When I give
> the command:
>
> $18_months_ago = strtotime("-18 months");
>
> It comes ba
The date value I was assigning was for a mySQL query ... a date range
query. I was running my query when I hadn't assigned a date to the
other date range variable. I didn't realized I hadn't copied my DATE()
syntax to this area of my code. Ron
On Sun, 2008-02-10 at 18:22 +0100, Floor Terra wro
On 2/10/08, Ron Piggott <[EMAIL PROTECTED]> wrote:
> I figured out what went wrong. Ron
>
Care to share it with us?
Floor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I figured out what went wrong. Ron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ron Piggott wrote:
>
> I am trying to calculate what was the date 18 months ago. When I give
> the command:
>
> $18_months_ago = strtotime("-18 months");
>
> It comes back with:
>
> Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE
That's a plain syntactical error, it's no
I am trying to calculate what was the date 18 months ago. When I give
the command:
$18_months_ago = strtotime("-18 months");
It comes back with:
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE
How would you calculate 18 months ago from today?
Ron
--
PHP General Mailin
On Thu, January 31, 2008 3:29 pm, Mike Morton wrote:
> Except that generally, when am told "next Saturday" - I take that to
> mean
> "the next Saturday" - just one more ambiguity in the english language
> that
> makes it so hard to learn I suppose!
strtotime has always seemed to me like it's borde
Mike Morton schreef:
Good point ;)
Except that generally, when am told "next Saturday" - I take that to mean
"the next Saturday" - just one more ambiguity in the english language that
makes it so hard to learn I suppose!
The odd thing about this whole situation it that it seems to have cropped
Good point ;)
Except that generally, when am told "next Saturday" - I take that to mean
"the next Saturday" - just one more ambiguity in the english language that
makes it so hard to learn I suppose!
The odd thing about this whole situation it that it seems to have cropped up
just after we "upgra
Maybe it's just me, but I've never quite figured out what people mean
when they say "next Saturday"...
Do they mean the next one coming up?
Or do they mean that there's "this Saturday" coming up and "next
Saturday" the one after that?
And if I can't figure it out, why would you expect PHP to fig
On 31/01/2008, Mike Morton <[EMAIL PROTECTED]> wrote:
>
> Ya - the other server is 4.4.7
>
> However - this does not seem to be the problem necessarily:
>
> print date("m/d/Y",strtotime("next saturday"));
> 02/09/2008
>
> print date("m/d/Y",strtotime("next sunday"));
> 02/10/2008
>
> print date("m/
Ya - the other server is 4.4.7
However - this does not seem to be the problem necessarily:
print date("m/d/Y",strtotime("next saturday"));
02/09/2008
print date("m/d/Y",strtotime("next sunday"));
02/10/2008
print date("m/d/Y",strtotime("next monday"));
02/11/2008
print date("m/d/Y",strtotime("
On 31/01/2008, Mike Morton <[EMAIL PROTECTED]> wrote:
>
> I have been using:
>
> $nextSaturday= date("m/d/Y",strtotime("next saturday"));
>
> For months long time now with out problems, but in the last two days, it
> went kind of funky. It is now returning:
>
> 02/09/2008 instead of the expected 0
I have been using:
$nextSaturday= date("m/d/Y",strtotime("next saturday"));
For months long time now with out problems, but in the last two days, it
went kind of funky. It is now returning:
02/09/2008 instead of the expected 02/02/2008. I have tried the same code
on another server and differen
On 6/20/07, Phil Princely <[EMAIL PROTECTED]> wrote:
using this code:
function test_time($time_string) {
echo strftime("%X %A, %b %e\n", strtotime($time_string));
You should be testing the strtotime() call's return value, it returns
false on failure.
if (($timestamp = strtotime($str)) ===
Hi all
I'm new to this list. I hope this hasn't been discussed already.
using this code:
function test_time($time_string) {
echo strftime("%X %A, %b %e\n", strtotime($time_string));
}
test_time('now');
test_time('4pm + 2 Hours');
test_time('now + 2 fortnights');
test_time('last Monday');
tes
On 24 Oct 2006, at 19:07 , Brad Chow wrote:
$date=("2006-10-26");
$date=strtotime($date);
$date=date('Y-m-1',$date);
$now=strtotime("+3 month", strtotime($date));
$lastday=strtotime("-1 day", $now);
echo date('Y-m-d',$lastday);
//2006-12-31
Yep, that's pretty much exactly what I do. I suspect
Ron Piggott (PHP) wrote:
I have used the strtotime command to calculate a week ago (among other
things) with syntax like this:
$one_week_ago = strtotime("-7 days");
$one_week_ago = date('Y-m-d', $one_week_ago);
How would you use this command to figure out the last day of the month
in two months
Dear Ron:
I have a solution as follows:
$date=("2006-10-26");
$date=strtotime($date);
$date=date('Y-m-1',$date);
$now=strtotime("+3 month", strtotime($date));
$lastday=strtotime("-1 day", $now);
echo date('Y-m-d',$lastday);
//2006-12-31
It's a very easy way to do you want.
I use strtotime to co
Ron Piggott (PHP) wrote:
I have used the strtotime command to calculate a week ago (among other
things) with syntax like this:
$one_week_ago = strtotime("-7 days");
$one_week_ago = date('Y-m-d', $one_week_ago);
How would you use this command to figure out the last day of the month
in two months
I have used the strtotime command to calculate a week ago (among other
things) with syntax like this:
$one_week_ago = strtotime("-7 days");
$one_week_ago = date('Y-m-d', $one_week_ago);
How would you use this command to figure out the last day of the month
in two months from now --- Today is Oct
I am trying to convert a date and time (from the apache2 server logs) in
the format of 27/Aug/2006:19:02:20 +0200 to a UNIX timestamp and then
reformat it as a RFC compliant date by using date('r', $thedate);
My problem is as such. In PHP-5.1.2 it works perfectly and returns the
correct date. In
Richard Lynch wrote:
On Tue, May 24, 2005 7:24 am, Rahul S. Johari said:
I¹m trying to delete all files in a folder based on a string match with
the
following code:
Erase Successful!All images up to $date, have been
permanently erased from the Server.";
?>
I need the code to delete all images
On Tue, May 24, 2005 7:24 am, Rahul S. Johari said:
> I¹m trying to delete all files in a folder based on a string match with
> the
> following code:
>
> $dir = '/Library/WebServer/Documents/something.com/subfolder/';
> $dp = opendir($dir) or die ('Fatal Error: '.mysql_error());
> while ($file = r
Ave,
I¹m trying to delete all files in a folder based on a string match with the
following code:
Erase Successful!All images up to $date, have been
permanently erased from the Server.";
?>
I need the code to delete all images created till yesterday, and leave
images created today. Somehow strtot
Mario de Frutos Dieguez wrote:
Hi!
I'm back hahaha :D
I'm making functions to calculate the duration (only laboral days)
between 2 dates and the initial and final date between a duration give
me in laboral days.
I use the following function to make the diference between 2 dates:
function fecDife
Hi!
I'm back hahaha :D
I'm making functions to calculate the duration (only laboral days)
between 2 dates and the initial and final date between a duration give
me in laboral days.
I use the following function to make the diference between 2 dates:
function fecDiferenciaFechas($fecFechaInicio,$f
On Mon, April 4, 2005 3:14 pm, Al said:
> Suddenly my strtotime() are goofy, anyone have any ideas?
>
> echo date('Y/m/d/H', time()). ""; //2005/04/04/18
> echo date('Y/m/d/H', strtotime("-1 day")). "";
> //2005/04/03/18
> echo date('Y/m/d/H', strtotime("
Suddenly my strtotime() are goofy, anyone have any ideas?
echo date('Y/m/d/H', time()). ""; //2005/04/04/18
echo date('Y/m/d/H', strtotime("-1 day")). "";
//2005/04/03/18
echo date('Y/m/d/H', strtotime("last Sunday")). "";
//2005/04/02/23
Marcus Bointon wrote:
> Much of the point of using zone names rather than fixed numeric
> offsets is that it allows for correct daylight savings calculations
> (assuming that locale data is correct on the server).
>
> Let me rephrase the question - how can I get the current time in a
> named time z
Tom wrote:
Marcus Bointon wrote:
On 18 Jan 2005, at 10:53, Tom wrote:
PST = UTC - 8, therefore if you ask for strtotime in PST it will give
you now + 8. This is standard in most languages, you are just
reading the functionality back to front.
ie when you say strtotome('now PST'), what you are as
Marcus Bointon wrote:
On 18 Jan 2005, at 10:53, Tom wrote:
PST = UTC - 8, therefore if you ask for strtotime in PST it will give
you now + 8. This is standard in most languages, you are just reading
the functionality back to front.
ie when you say strtotome('now PST'), what you are asking for is
Marcus Bointon wrote:
On 18 Jan 2005, at 10:53, Tom wrote:
PST = UTC - 8, therefore if you ask for strtotime in PST it will give
you now + 8. This is standard in most languages, you are just
reading the functionality back to front.
ie when you say strtotome('now PST'), what you are asking for is
On 18 Jan 2005, at 10:53, Tom wrote:
PST = UTC - 8, therefore if you ask for strtotime in PST it will give
you now + 8. This is standard in most languages, you are just reading
the functionality back to front.
ie when you say strtotome('now PST'), what you are asking for is the
current local ti
Marcus Bointon wrote:
How is this not a bug?
outputs:
2005-01-18 09:58:09 (correct)
2005-01-18 17:58:09 (incorrect)
PST = UTC - 8, therefore if you ask for strtotime in PST it will give
you now + 8. This is standard in most languages, you are just reading
the functionality back to front.
ie whe
How is this not a bug?
outputs:
2005-01-18 09:58:09 (correct)
2005-01-18 17:58:09 (incorrect)
The time zone correction is applied in the wrong direction. Does it in
both current PHP 4 and 5.
Named time zones like these are supposedly deprecated, but the
suggested alternative in the docs doesn't
Alex Hogan wrote:
Does anybody know of any peculiarities in the strtotime() function?
If I enter any date before 1 Jan 1970 I get a -1 returned.
Note: The valid range of a timestamp is typically from Fri, 13 Dec 1901
20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that
corr
http://us3.php.net/manual/en/function.strtotime.php
Note: The valid range of a timestamp is typically from Fri, 13 Dec 1901
20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that
correspond to the minimum and maximum values for a 32-bit signed integer.)
Additionally, not all plat
Does anybody know of any peculiarities in the strtotime() function?
If I enter any date before 1 Jan 1970 I get a -1 returned.
alex hogan
*
The contents of this e-mail and any files transmitted with i
Hi,
On Tue, 27 Jan 2004 23:05:09 -0500
gohaku <[EMAIL PROTECTED]> wrote:
> Hi everyone,
> I made the mistake of using strtotime("day") instead of
> strtotime("today")
> to get the current time.
> I was just curious, what is strtotime("day") represent?
>
> Below is what I used to test the "day"
Hi everyone,
I made the mistake of using strtotime("day") instead of
strtotime("today")
to get the current time.
I was just curious, what is strtotime("day") represent?
Below is what I used to test the "day" and "today" parameters:
Testing One Minute Difference
Thanks in advance.
-Gohaku
WOW! Blindingly simple mistake --> couldn't see the forest before the
trees (or something like that). THANKS for the helping hand!
Gnik
--- Eugene Lee <[EMAIL PROTECTED]> wrote:
> On Fri, Nov 14, 2003 at 08:53:41PM -0800, Gnik wrote:
> :
> : One of my servers required a PHP upgrade. Afterwards o
On Fri, Nov 14, 2003 at 08:53:41PM -0800, Gnik wrote:
:
: One of my servers required a PHP upgrade. Afterwards one of the PHP
: projects stopped functioning. When it would run one section would
: scroll endlessly. I can't figure out if it's a 'bug' or if it's bad
: logic in the coding.
Bad logic
--- Gnik <[EMAIL PROTECTED]> wrote:
> I isolated the problem to be in the 'strtotime' function. Here is a
> test I ran - when it runs, after getting to 2003-10-26, it scrolls
> incessently:
>
> BEGIN CODE--
> $stop= "2003-12-27" ;
> $start= "2003-01-01" ;
> While ($start <> $stop) {
>
Greetings,
One of my servers required a PHP upgrade. Afterwards one of the PHP
projects stopped functioning. When it would run one section would scroll
endlessly. I can't figure out if it's a 'bug' or if it's bad logic in the
coding.
I isolated the problem to be in the 'strtotime' function. Here
Hello,
I'm not even quite sure if I am posting this message in the right place,
so please bear with me.
I have a question regarding the strtotime() function. I am developing a PHP
script to handle dates for my web site, and I need an easy way to get from
today to tomorrow to +2 days to +3 days
> > strtotime( '+1 month', mktime( 0, 0, 0, 1, 1, 2003 ));
> > I get back the timestamp for 1/31/2003 and not 2/1/2003.
> Are you sure?
Yeah, but I missed something in my above example. If I did this:
strtotime( '+1 month GMT', mktime( 0, 0, 0, 1, 1, 2003 ));
It came back with 1/31/2003 and no
1 - 100 of 124 matches
Mail list logo