Re: Need help with timestamp....
| From: | Brian White | Date: | Fri, 06 Jul 2001 00:47:03 +0000 |
| Subject: | Re: Need help with timestamp.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56419@lists.php.net to get a copy of this message | ||
As I understand it,
* "strftime" takes a format string and an integer timestamp and returns a date string
* "date" takes a different type of format string and an integer timestamp and returns a date string
In both cases they default to using the timestamp for the current time.
SO: what you code is doing is
1) Calculating a date string using "date" based on the current time
2) Passing that string to strfttime at a point where it is expecting an integer
timestamp, and that is being interpreted as 0 or -1 ( not sure which )
Maybe just:
define('SUB_BAR_TITLE', strftime(DATE_FORMAT_LONG));
At 20:46 5/07/2001 -0400, JustinS wrote:
I want to stamp the CURRENT time on my page... as of right now it's reading ====== Wednesday 31 December, 1969 ====== i assume im not doing something correctly... the following is how i have the line written atm define('SUB_BAR_TITLE', strftime(DATE_FORMAT_LONG, (date ("F d, Y h:i:s A")))); no, i did not write this script, which is the reason i dunno what the heck im doing -- im curious if anyone has some insight on the problem Thanks in advance.------------------------- Brian White Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: bwhite@steptwo.com.au