[PHP] Timestamp needed in error log

2006-04-08 Thread 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 pointers on where I should look

Re: [PHP] Timestamp needed in error log

2006-04-08 Thread darren kirby
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 pointers

Re: [PHP] Timestamp needed in error log

2006-04-08 Thread darren kirby
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 facilities to

Re: [PHP] Timestamp needed in error log

2006-04-08 Thread Richard Lynch
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 have to

[PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Bruno B B Magalhães
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

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Richard Davey
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 BBBM

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Bruno B B Magalhães
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);

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Bruno B B Magalhães
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; }

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Edward Vermillion
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)

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Bruno B B Magalhães
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

Re: [PHP] TimeStamp BEFORE 1970 AND AFTER 2035

2005-07-07 Thread Bruno B B Magalhães
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

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Edward Vermillion
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...

[PHP] timestamp problem?

2005-02-08 Thread Balu Stefan
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

Re: [PHP] timestamp problem?

2005-02-08 Thread Jason Wong
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

Re: [PHP] timestamp problem?

2005-02-08 Thread Richard Lynch
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

[PHP] timestamp according to timezone?

2004-08-12 Thread Justin French
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

RE: [PHP] timestamp according to timezone?

2004-08-12 Thread Ford, Mike [LSS]
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 way

Re: [PHP] timestamp according to timezone?

2004-08-12 Thread Jason Wong
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

Re: [PHP] timestamp according to timezone?

2004-08-12 Thread Justin French
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

Re: [PHP] timestamp according to timezone?

2004-08-12 Thread Jason Wong
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

[PHP] SOLVED:Re: [PHP] timestamp to readabe date and time ?

2004-04-11 Thread Damian Brown
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

Re: [PHP] timestamp to readabe date and time ?

2004-04-11 Thread Don Read
On 11-Apr-2004 Ryan A wrote: snipage 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 =

[PHP] timestamp to readabe date and time ?

2004-04-10 Thread Damian Brown
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

Re: [PHP] timestamp to readabe date and time ?

2004-04-10 Thread Ryan A
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

Re: [PHP] timestamp to readabe date and time ?

2004-04-10 Thread Damian Brown
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

[PHP] Timestamp query...

2004-02-27 Thread Ryan A
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

Re: [PHP] Timestamp query...

2004-02-27 Thread Michal Migurski
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 that

Re: [PHP] Timestamp query...

2004-02-27 Thread Robert Cummings
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 day,

Re: [PHP] Timestamp query...

2004-02-27 Thread Ryan A
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 where he can

Re: [PHP] Timestamp query...

2004-02-27 Thread Jason Wong
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

[PHP] mysql or php timestamp arithmatic

2003-08-26 Thread Christian Calloway
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

Re: [PHP] timestamp

2003-08-22 Thread John Taylor-Johnston
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);

Re: [PHP] timestamp

2003-08-22 Thread John Taylor-Johnston
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 =

Re: [PHP] timestamp

2003-08-22 Thread Gabriel Guzman
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` TIMESTAMP

Re: [PHP] timestamp

2003-08-22 Thread John Taylor-Johnston
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

Re: [PHP] timestamp

2003-08-22 Thread Gabriel Guzman
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

Re: [PHP] timestamp

2003-08-22 Thread CPT John W. Holmes
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 timestamp

Re: [PHP] timestamp

2003-08-22 Thread John Taylor-Johnston
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 minutes

[PHP] timestamp

2003-08-21 Thread John Taylor-Johnston
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

Re: [PHP] timestamp problem !!

2003-07-15 Thread Chris Boget
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) .

RE: [PHP] timestamp problem !!

2003-07-15 Thread Boaz Yahav
, 2003 8:00 PM To: [EMAIL PROTECTED] Subject: [PHP] timestamp problem !! i have ?php $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 Please Advice

[PHP] timestamp problem !!

2003-07-14 Thread Nabil
i have ?php $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 Please Advice Nabil -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] timestamp problem !!

2003-07-14 Thread Chris Boget
?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime = ($timy); $date = (Y-m-d , $timy); ? You are so very close! ?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime = ($timy); $date = date(Y-m-d , strtotime( $timy )); ? $timy isn't a unix timestamp,

Re: [PHP] timestamp problem !!

2003-07-14 Thread Jason Wong
On Wednesday 16 July 2003 02:00, Nabil wrote: ?php $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 up

Re: [PHP] timestamp problem !!

2003-07-14 Thread Nabil
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] ?php $timy = '20030714012548'; // time stamp from MySQL echo strtotime =

Re: [PHP] timestamp problem !!

2003-07-14 Thread Nabil
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

Re: [PHP] timestamp problem !!

2003-07-14 Thread Curt Zirzow
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 seconds

Re: [PHP] timestamp problem !!

2003-07-14 Thread myhan
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) |

Re: [PHP] timestamp problem !!

2003-07-14 Thread myhan
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 the

Re: [PHP] TIMESTAMP - Y-m-d

2003-06-08 Thread Don Read
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

[PHP] TIMESTAMP - Y-m-d

2003-06-05 Thread nabil
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

Re: [PHP] TIMESTAMP - Y-m-d

2003-06-05 Thread Justin French
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

Re: [PHP] TIMESTAMP - Y-m-d

2003-06-05 Thread Justin French
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

Re: [PHP] TIMESTAMP - Y-m-d

2003-06-05 Thread Marek Kilimajer
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,

[PHP] timestamp from uniqid()

2003-04-02 Thread nooper
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

Re: [PHP] timestamp from uniqid()

2003-04-02 Thread Sebastian
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 in

Re: [PHP] timestamp from uniqid()

2003-04-02 Thread Justin French
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 be a way to

Re: [PHP] timestamp to english

2003-03-10 Thread James Holden
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 by

Re: [PHP] timestamp to english

2003-03-10 Thread Joel Colombo
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(time),%H

[PHP] timestamp to english

2003-03-09 Thread Lord Loh.
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:

RE: [PHP] timestamp to english

2003-03-09 Thread John W. Holmes
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 format a

Re: [PHP] timestamp to english

2003-03-09 Thread Jason Wong
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 Source

[PHP] timestamp triggered only on update?

2002-07-25 Thread Ragnar
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

[PHP] TIMESTAMP and COMPARISON

2002-03-20 Thread chris allen
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

Re: [PHP] TIMESTAMP and COMPARISON

2002-03-20 Thread Jason Wong
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 older

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-06 Thread DL Neil
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

[PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Andy
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-2038

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Jason Wong
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,

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Mike Eheler
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,

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Andy
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 playing around

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread DL Neil
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 with

[PHP] Re: [PHP-DB] Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Ken Thompson
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? ?php echo date(D. M. d, Y) ? Thanx, Andy Jason Wong [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]...

[PHP] timestamp confusion

2002-02-20 Thread Justin French
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

Re: [PHP] timestamp confusion

2002-02-20 Thread Billy S Halsey
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

Re: [PHP] timestamp confusion

2002-02-20 Thread Justin French
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

Re: [PHP] timestamp confusion

2002-02-20 Thread Jeff Sheltren
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

Re: [PHP] timestamp confusion

2002-02-20 Thread Justin French
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

Re: [PHP] timestamp confusion

2002-02-20 Thread Justin French
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

RE: [PHP] Timestamp math and format

2001-10-19 Thread Alfredeen Johan K
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

[PHP] Timestamp field

2001-02-05 Thread Chad Guilette
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,

Re: [PHP] Timestamp field

2001-02-05 Thread David Robley
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 topic (