Cacti 0.8 , |date_time| variable

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
jvanhambelgium
Posts: 33
Joined: Fri Jan 10, 2003 3:16 am
Location: Antwerpen (Belgium)
Contact:

Cacti 0.8 , |date_time| variable

Post by jvanhambelgium »

Hi,

Anyone know what I should change in this piece of code (rrd_functions.php) to display the date_time correctly on my FreeBSD 4.8 box ?

if (strstr($text_format[$graph_item_id], "|date_time|"))
{
$text_format[$graph_item_id] = str_replace("|dat
e_time|", date('D M H:i:s T Y', strtotime(db_fetch_cell("select value from setti
ngs where name='date'"))), $text_format[$graph_item_id]);
}

With this code, my graphs display ;

"Friday Aug 13:39:50 CEST 2003"

What I was looking for is to add the day in numeric form ;

"Friday Aug 29 13:39:50 CEST 2003"


Or could it be because I use FreeBSD ?


Thanks & regards,
Jan
"Never Trust A Computer You Can't Throw Out A Window" - Steve Wozniak
User avatar
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

Post by pestilence »

if (strstr($text_format[$graph_item_id], "|date_time|"))
{
$text_format[$graph_item_id] = str_replace("|dat
e_time|", date('D M d H:i:s T Y', strtotime(db_fetch_cell("select value from setti
ngs where name='date'"))), $text_format[$graph_item_id]);
}

This should be ok for you...
jvanhambelgium
Posts: 33
Joined: Fri Jan 10, 2003 3:16 am
Location: Antwerpen (Belgium)
Contact:

Post by jvanhambelgium »

Hi,

Yep indeed, that was the parameter I was looking for ...
I should have read the "date" manpages before asking...

THanks & regards,
Jan
"Never Trust A Computer You Can't Throw Out A Window" - Steve Wozniak
smartinez
Posts: 21
Joined: Thu Mar 13, 2003 10:29 am
Location: Austin, Texas

Post by smartinez »

For Solaris 9:

Any idea why using the "T" in the date('D M H:i:s T Y' field would result in "BST"? The date on the server correctly results in CST. I've read through the man-pages hoping it would clarify but so far... nothing... :)

Thanks!

-Samson
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests