http://php.net/set_error_handler
On Sat, April 8, 2006 10:01 am, John Hicks wrote:
> I would like to configure my PHP 4.3 to include a timestamp in its
> error
> messages.
>
> It appears that PHP defaults to no timestamp. I can't a find a
> directive
> that allows me to configure this.
>
> Do I
quoth the John Hicks:
> > You don't explain much about your setup here, but on mine, I just write
> > my errors to the apache error log, which provides its own timestamp.
> >
> > Another option is to log to the system logs:
> > error_log = syslog # in php.ini
> >
> > and use your loggers filter fa
quoth the John Hicks:
> I would like to configure my PHP 4.3 to include a timestamp in its error
> messages.
>
> It appears that PHP defaults to no timestamp. I can't a find a directive
> that allows me to configure this.
>
> Do I have to recompile?
>
> I've never looked at the source before. Any p
I would like to configure my PHP 4.3 to include a timestamp in its error
messages.
It appears that PHP defaults to no timestamp. I can't a find a directive
that allows me to configure this.
Do I have to recompile?
I've never looked at the source before. Any pointers on where I should
look f
On Jul 7, 2005, at 10:17 PM, Bruno B B Magalhães wrote:
Hi Edward,
thanks for replying!
[snip]
Why 1976, because it's a leap year and is between valid range for
windows systems.
Let me try to explain the rest.
First I get the input year... which by the way is working fine here...
preg_
Just a quick fix, as now I've tested in a real environment, with a
real application, and now it's working 100%, well, I think so.
/
*
* Stritotime workaround for dates before 1970 and after 2038
***
Hi Edward,
thanks for replying!
On Jul 7, 2005, at 10:44 PM, Edward Vermillion wrote:
One problem is that there's no accounting for leap years, but I
don't know if that's gonna cause you any problems or not.
Course it have, when we multiply the year offset by 31557376.189582
we are using t
On Jul 7, 2005, at 7:54 PM, Bruno B B Magalhães wrote:
Hi Folks,
Well I think I got it, at least it's working more or less to me now...
I really would appreciate any comments or suggestions.
function str2time($input = '12/31/1969')
{
if(($output = strtotime($input)) !== -1)
Hi Folks,
Well I think I got it, at least it's working more or less to me now...
I really would appreciate any comments or suggestions.
function str2time($input = '12/31/1969')
{
if(($output = strtotime($input)) !== -1)
{
return $output;
}
else
Hi Richard,
Well, I took a look at, and I think it is TOO complex to handler a
simple thing..
Well, that's my little contribution:
function str2time($input = '12/31/1969')
{
$year= substr($input, -4);
$input= substr_replace($input, 1976 , -4);
return
Hello Bruno,
Thursday, July 7, 2005, 7:04:44 PM, you wrote:
BBBM> I've read the manual, and the ADOdb Date package functions, and
BBBM> I am not using this because I want to keep my framework simple,
BBBM> flexible, and fast.
BBBM> Well, I just want a simple way to translate dates (I know what
B
Well,
I've read the manual, and the ADOdb Date package functions, and I am
not using this because I want to keep my framework simple, flexible,
and fast.
Well, I just want a simple way to translate dates (I know what is the
input format) to unix timestamp, with ability to do this with dat
Balu Stefan wrote:
> First of all, hello everybody,
> I am having some problems generating timestamps.
> I have a simple application, the user selects a month, a day and a year
> and submits
> it's data.
> Now, I want that date to be stransformed into a unixtimestamp. To do
> that
> I use strtotime
On Tuesday 08 February 2005 19:30, Balu Stefan wrote:
> Also mktime generates the second timestamp ...damn, I really don't know
> why there are two different
> timestamps for the same date.
A few of PHP's date/time functions take into account the local time zone
of the server.
So:
> I use strt
First of all, hello everybody,
I am having some problems generating timestamps.
I have a simple application, the user selects a month, a day and a year
and submits
it's data.
Now, I want that date to be stransformed into a unixtimestamp. To do
that
I use strtotime('m/d/y') for 01 January 2011 it w
On Thursday 12 August 2004 22:11, Justin French wrote:
> You're absolutely right, it doesn't make sense, and even though it was
> less than an hour ago, I can't really remember how I decided I needed
> such a thing. It's part of an endless loop of confusion I currently
> have with timezones for a
On 12/08/2004, at 11:26 PM, Jason Wong wrote:
On Thursday 12 August 2004 21:06, Justin French wrote:
How can I get a unix timestamp of the current timezone, rather than
GMT
as supplied by time()?
What are you trying to solve? The unix timestamp is based off GMT
(UTC). All
calculations involving s
On Thursday 12 August 2004 21:06, Justin French wrote:
> How can I get a unix timestamp of the current timezone, rather than GMT
> as supplied by time()?
What are you trying to solve? The unix timestamp is based off GMT (UTC). All
calculations involving such timestamps will be assuming GMT. Thus
On 12 August 2004 14:07, Justin French wrote:
> Hi,
>
> How can I get a unix timestamp of the current timezone, rather than
> GMT as supplied by time()?
Sorry, but this question makes no sense to me. A timestamp is absolute and
is always in GMT, taking no account of timezones -- that's just the
Hi,
How can I get a unix timestamp of the current timezone, rather than GMT
as supplied by time()?
---
Justin French
http://indent.com.au
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 11-Apr-2004 Ryan A wrote:
>
> If you are using timestamp(14), here is how i do it: (after
the
> select)
>
> if(($row = mysql_fetch_row($result))>=1)
> {
> $d_year = substr($row[4],0,4);
> $d_month = substr($row[4],4,2);
> $d_day = substr($row[4],6,2);
> $d_hours = substr($row[4]
problem was solved by using substr() on the timestamp
--
www.phpexpert.org/truefaith.htm
"True Faith is not just when you believe in God and yourself, it is when
others begin to believe in you as well" - Damian John Paul Brown 2004
"Damian Brown" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PR
Thank Yoy Ryan
I had thought the same, but I didn't know how to go about it
I did not know of the substr function
it is now outputting as follows
10 04 2004 - 21:23:50
Thanks once again, I am sure I will be asking for more help soon
I tend to dive in at the deep end and never learn the basics
--
On 4/11/2004 3:25:09 AM, Damian Brown ([EMAIL PROTECTED]) wrote:
> I need to output a date and time that shows more clearly than just
> outputting the timestamp
>
> what is the correct way to go about it ?
> I have looked at getdate(), but I haven't fathomed it out yet !
If you are using timesta
I need to output a date and time that shows more clearly than just
outputting the timestamp
what is the correct way to go about it ?
I have looked at getdate(), but I haven't fathomed it out yet !
--
www.phpexpert.org/truefaith.htm
"True Faith is not just when you believe in God and yourself, it
On Saturday 28 February 2004 12:08, Ryan A wrote:
> We needed a timestamp there because of other calcalations from other
> scripts that access the
> same table. Regarding your solution, can you give me a quick example
> please? its 5am and i'm
> pretty braindead
>
> I am familier with the LIKE
On 2/28/2004 4:43:48 AM, Michal Migurski ([EMAIL PROTECTED]) wrote:
> >The field is join_date_time and the values are something like:
> >2004022215
> >20040223015329
> >
> >Everything is working fine and dandy except now that the client wants a
> >search functionality in his "control panel" wh
On Fri, 2004-02-27 at 22:43, Michal Migurski wrote:
> >The field is join_date_time and the values are something like:
> >2004022215
> >20040223015329
> >
> >Everything is working fine and dandy except now that the client wants a
> >search functionality in his "control panel" where he can enter
>The field is join_date_time and the values are something like:
>2004022215
>20040223015329
>
>Everything is working fine and dandy except now that the client wants a
>search functionality in his "control panel" where he can enter the day,
>month, year and see all the people who have joined on
Hi,
I have a couple of records in the DB with timestamp(14) values.
The field is join_date_time and the values are something like:
2004022215
20040223015329
Everything is working fine and dandy except now that the client wants a
search functionality
in his "control panel" where he can enter t
Hey everyone,
I am writing an application to keep track of employee vacation leave. I have
two timestamp(14) database fields, lets call them start and end, signifying
when start and end of a vacation leave, respectively. What I am trying to do
is get the number of hours between start and end, for
Indeed easier than I thought?! :)
timestamp(14) is ok :)
Thanks John!
John
--
http://compcanlit.ca/
Quoting "CPT John W. Holmes" <[EMAIL PROTECTED]>:
> SELECT * FROM Table WHERE timestamp_column < NOW() - INTERVAL 60 MINUTE
> will give you all rows that have a timestamp column that's over 60 minu
From: "John Taylor-Johnston" <[EMAIL PROTECTED]>
> I'm creating a counter.
>
> I want a timestamp where I can calculate if a time stamp is older than one
hour, if so do X, if not do Y.
SELECT * FROM Table WHERE timestamp_column < NOW() - INTERVAL 60 MINUTE
will give you all rows that have a tim
On Fri, 2003-08-22 at 11:50, John Taylor-Johnston wrote:
> I'm creating a counter.
>
> I want a timestamp where I can calculate if a time stamp is older than one hour, if
> so do X, if not do Y.
so, you have the timestamp already correct? in your mysql db. all you
should need to do is get the
I'm creating a counter.
I want a timestamp where I can calculate if a time stamp is older than one hour, if so
do X, if not do Y.
>Gabriel Guzman wrote:
>http://us4.php.net/time
>and
>http://www.mysql.com/doc/en/DATETIME.html
I have looked at both, especially http://www.mysql.com/doc/en/DATETIM
On Thu, 2003-08-21 at 22:23, John Taylor-Johnston wrote:
> Not teasing, I know I could do this with some ready made script, but I want to make
> my own.
>
> I'm making a counter.
>
> CREATE TABLE `counter` (
> `IPAddress` VARCHAR NOT NULL ,
> `RemoteHost` VARCHAR NOT NULL ,
> `TimeStamp` T
Anyone? Please :)
John Taylor-Johnston wrote:
> This is what I'm using so far. But I need to put in a time stamp to calculate if the
> visitor is new. I want to use the IP so if the ip saved in MySQL is older than 60
> minutes, it will write a new record, if not, don't:
>
> $myconnection = mysq
This is what I'm using so far. But I need to put in a time stamp to calculate if the
visitor is new. I want to use the IP so if the ip saved in MySQL is older than 60
minutes, it will write a new record, if not, don't:
$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myco
Not teasing, I know I could do this with some ready made script, but I want to make my
own.
I'm making a counter.
CREATE TABLE `counter` (
`IPAddress` VARCHAR NOT NULL ,
`RemoteHost` VARCHAR NOT NULL ,
`TimeStamp` TIMESTAMP NOT NULL,
`Date` VARCHAR NOT NULL
)
Question 1, how do I creat
, 2003 8:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] timestamp problem !!
i have
and i have a wrong result how can i extract the -MM-DD from the
string $timy
Please Advice
Nabil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
> Hi Chris..
> thanks but your code generate the following error
> Warning: date() [function.date]: Unexpected error in .
> what's wrong? any idea ??
Sorry. You just need to take out this line:
echo strtotime = ($timy);
either that, or change it to:
echo strtotime( $timy ) . ' = ' . ($timy
The quick and easy to convert a mysql timestamp is to use the
UNIX_TIMESTAMP(field_name) function in mysql when you query the data. It
converts a 14-digit mysql timestamp to a standard unix timestamp.
"Myhan" <[EMAIL PROTECTED]> дÈëÏûÏ¢ÐÂÎÅ
:[EMAIL PROTECTED]
> mysql's timstamp in this case is in
mysql's timstamp in this case is in the format:
MMDDHHMMSS
and it's default value is current time.
| TIMESTAMP(14) | MMDDHHMMSS |
| TIMESTAMP(12) | YYMMDDHHMMSS |
| TIMESTAMP(10) | YYMMDDHHMM |
| TIMESTAMP(8) | MMDD |
| TIMESTAMP(6) | YYMMDD |
| TIMESTAMP(4) | YY
Nabil <[EMAIL PROTECTED]> wrote:
> thanks Jason, you've been always helping me ...
>
> Please i still have some fog regading this.. can u expaling me more about
> the timestamp and unix timestamp...
mysql's timstamp in this case is in the format:
MMDDHHMMSS
Unix timstamp number of secon
thanks Jason, you've been always helping me ...
Please i still have some fog regading this.. can u expaling me more about
the timestamp and unix timestamp...
and regaring me issue i have a string with '20030714012548' what ever i got
it from (because i m getting this from MSSQL some time and the
Hi Chris..
thanks but your code generate the following error
Warning: date() [function.date]: Unexpected error in .
what's wrong? any idea ??
"Chris Boget" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > > $timy = '20030714012548'; // time stamp from MySQL
> > echo strtotim
On Wednesday 16 July 2003 02:00, Nabil wrote:
> $timy = '20030714012548'; // time stamp from MySQL
> echo strtotime = ($timy);
> $date = ("Y-m-d" , $timy);
> ?>
>
> and i have a wrong result how can i extract the -MM-DD from the
> string $timy
MySQL TIMESTAMP != UNIX TIMESTAMP
Look
> $timy = '20030714012548'; // time stamp from MySQL
> echo strtotime = ($timy);
> $date = ("Y-m-d" , $timy);
> ?>
You are so very close!
$timy isn't a unix timestamp, which is what date() is expecting.
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
i have
and i have a wrong result how can i extract the -MM-DD from the
string $timy
Please Advice
Nabil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 05-Jun-2003 nabil wrote:
> Please help me how to print a timestamp string retrived from the
> database,
> and print it as -MM-DD
>
MySQL ?
http://www.mysql.com/doc/en/Date_and_time_functions.html
--
Don Read [EMAIL PROTECTED]
-- It's always darkest
mysql manual -> DATE_FORMAT() function. Simply do
SELECT DATE_FORMAT('format string', timestamp_column) ...
nabil wrote:
Please help me how to print a timestamp string retrived from the database,
and print it as -MM-DD
Nabil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
on 05/06/03 6:24 PM, Nabil Attar ([EMAIL PROTECTED]) wrote:
> mysql time stamp
well, there are a few different formats that can be returned, so rather than
me guessing which type, how about you tell us exactly what format you have
(by providing an example), and exactly what format you want to ech
A unix timestamp, or mysql timestamp?
for unix, see http://au.php.net/date
justin
on 05/06/03 5:38 PM, nabil ([EMAIL PROTECTED]) wrote:
> Please help me how to print a timestamp string retrived from the database,
> and print it as -MM-DD
>
> Nabil
>
>
--
PHP General Mailing List (h
Please help me how to print a timestamp string retrived from the database,
and print it as -MM-DD
Nabil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If you want the microsecond use microtime().
Justin
on 02/04/03 8:44 PM, Sebastian ([EMAIL PROTECTED]) wrote:
> may i ask what is it that your trying to do? Why not use time(); ?
>
> cheers,
> Sebastian
>
> - Original Message -
> From: "nooper" <[EMAIL PROTECTED]>
>
>
> | Would there
may i ask what is it that your trying to do? Why not use time(); ?
cheers,
Sebastian
- Original Message -
From: "nooper" <[EMAIL PROTECTED]>
| Would there be a way to extract a timestamp from uniqid(), since the
| function is based on the microsecond, and its purpose is not to be random
Would there be a way to extract a timestamp from uniqid(), since the
function is based on the microsecond, and its purpose is not to be random in
anyway, simply unique. I understand that it is not supposed to act as a
timestamp, just wondering if anyone has a method of extracting a date or
time fro
jim
there is no need for the second parameter in Date() for PHP, unless u want
something other then current time.
Date ('m-d-y') is the same as Date ('m-d-y', Time())
Joel
"James Holden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In mysql use
>
> DATE_FORMAT(FROM_UNIXTIME(tim
In mysql use
DATE_FORMAT(FROM_UNIXTIME(time),"%H ... etc")
In PHP use
echo date("", time());
Read the manuals at mysql.com and php.net.
jim
Lord Loh. wrote:
How do I convert the unix time stamp (the one I get by the time()) to a
readable English language time
I am getting data from mySQL
On Monday 10 March 2003 14:34, Lord Loh. wrote:
> How do I convert the unix time stamp (the one I get by the time()) to a
> readable English language time
>
> I am getting data from mySQL by the "now()" function
strftime()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Sou
> How do I convert the unix time stamp (the one I get by the time()) to
a
> readable English language time
>
> I am getting data from mySQL by the "now()" function
Unix timestamps in PHP and the result of NOW() in MySQL are totally
different.
You'd use the date() function in PHP to form
How do I convert the unix time stamp (the one I get by the time()) to a
readable English language time
I am getting data from mySQL by the "now()" function
Please Help
Thank You.
Lord Loh.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/uns
Maybe the wrong forum, but im giving it a try.
Im used to for instance 2 columns in each table indicating when it was
created and when it was last updated:
Changed_date
Registered_date
In mysql it seems it is only possible to define a column as a timestamp, and
this will trigger both on insert
On Thursday 21 March 2002 03:53, chris allen wrote:
> Hello,
>
>
> I am looking for a standard way to compare to dates. I have a date/time
> stored in a field in a mysql table as
> date_added TIMESTAMP(14). (IE mmddhhmmss).
>
> I want to delete all records in this table if date_added is ol
Hello,
I am looking for a standard way to compare to dates. I have a date/time
stored in a field in a mysql table as
date_added TIMESTAMP(14). (IE mmddhhmmss).
I want to delete all records in this table if date_added is older than 2
hours.
IE
if current_date > date_added +2 hours then
Hi Andy
I apologise. The way I wrote the suggestion looks very much like a SQL
query doesn't it? It wasn't!
It would have been better expressed if I had said:
retrieve the MySQL timestamp field as a UNIX (epoch) timestamp, by using
the UNIX_TIMESTAMP function within the SELECT statement
> I trye
On Tuesday 05 March 2002 05:11 pm, Andy wrote:
> So what is the proper function in PHP to convert the MySQL timestamp into a
> proper format like Sonday, Apr. 20th 2002?
> Thanx,
>
> Andy
>
>
> "Jason Wong" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]...
>
> > On Wednesd
Andy,
> So what is the proper function in PHP to convert the MySQL timestamp
into a
> proper format like Sonday, Apr. 20th 2002?
SELECT from SQL using UNIX_TIMESTAMP()
Format for presentation in PHP using: string date ( string format [, int
timestamp])
Regards,
=dn
> > > I am playing around
The long way, but it will help in the understanding of it:
$timestamp = "20020305211704";
$year = substr($timestamp, 0, 4);
$month = substr($timestamp, 4, 2);
$day = substr($timestamp, 6, 2);
$hour = substr($timestamp, 8, 2);
$minute = substr($timestamp, 10, 2);
$second = substr($timestamp, 12, 2
So what is the proper function in PHP to convert the MySQL timestamp into a
proper format like Sonday, Apr. 20th 2002?
Thanx,
Andy
"Jason Wong" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED].;
> On Wednesday 06 March 2002 04:31, Andy wrote:
> > Hi there,
> >
> > I am playin
On Wednesday 06 March 2002 04:31, Andy wrote:
> Hi there,
>
> I am playing around with the timestamp functions. I created a timestamp
> with mysql ( the row is timestamp)
> and do reformat this thing after selecting with php in the folowíng way:
>
> $date_posted[$i] = strftime("%A, %d-%m-%Y %R",
Hi there,
I am playing around with the timestamp functions. I created a timestamp with
mysql ( the row is timestamp)
and do reformat this thing after selecting with php in the folowíng way:
$date_posted[$i] = strftime("%A, %d-%m-%Y %R", $date_posted[$i]);
This always returns Tuesday, 19-01-203
Okay, that's what I needed to hear...
so I'll just add 61200seconds onto the timestamp, and i'll be "in the
ball park".
thanks to everyone,
justin
Scott Brown wrote:
>
> Seems to me that those functions expect GMT based time.
>
> Here in Ontario Canada, I'm GMT-5 (or -4 at some points in the
well, just add 17 hours (17h * 60m/h * 60s/m = 61200 [aren't calculators
wonderful :)] ) i guess
-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:02 PM
To: php
Subject: Re: [PHP] timestamp confusion
Jeff Sheltren wrote:
> We
Jeff Sheltren wrote:
> Well, what you are missing is that those are the number of seconds *on that
> machine* since 1970... so actually, if both of your clocks were set
> correctly, you should be getting the *same* number returned by
> time(). Hope that clears it up a little.
A geez *slaps
Well, what you are missing is that those are the number of seconds *on that
machine* since 1970... so actually, if both of your clocks were set
correctly, you should be getting the *same* number returned by
time(). Hope that clears it up a little.
Jeff
At 03:18 PM 2/21/2002 +1100, Justin Fr
It doesn't seem to me like this is an issue... isn't the timestamp just
the local unix time? It is on my LAN server.
The issue I have is that
echo date('d M Y H:m:s','1014261839');
produces 21 Feb 2002 14:02:59 on my LOCAL machine
echo date('d M Y H:m:s','1014260440');
produces 20 Feb 2002 21:
Justin,
Take a look at the gettimeofday() function, which returns the timezone
and daylight-savings-time values for the system.
-bsh
Justin French wrote:
>hi,
>
>when people add something to a table, i'm logging the time()... later,
>when I pull it out, i'm doing something like date('d M Y',$
hi,
when people add something to a table, i'm logging the time()... later,
when I pull it out, i'm doing something like date('d M Y',$stamp), which
all works fine, printing something like "21 Jan 2002".
problem is, i'm on a server in canada, but 99% of my users will be in Australia.
to get an i
Thanks, That was just what I needed, ie:
SELECT DATE_FORMAT(DATE_SUB(insert_date, INTERVAL 2 HOUR), '%b %e (%r)')
Johan
> On 17-Oct-2001 Alfredeen Johan K wrote:
> > I store a timestamp in a database of when a record was
> inserted. When I pull
> > it out, I format it like this SELECT
> DATE_F
On Tue, 6 Feb 2001 10:03, Chad Guilette wrote:
> I'm currenly having a problem with a timestamp field I have on my message
> board...each message is given a timestamp and stored in a table...heres
> the basic form of the insert...
>
> $time_added=date("Y m d H i s A");
>
> $str = "INSERT INTO to
I'm currenly having a problem with a timestamp field I have on my message
board...each message is given a timestamp and stored in a table...heres the
basic form of the insert...
$time_added=date("Y m d H i s A");
$str = "INSERT INTO topic ( num_id, user, quote, subject, ip, message_icon,
page,
82 matches
Mail list logo