"Position Timestamp"this time is not conform to t

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
cfybyair
Posts: 27
Joined: Fri Sep 01, 2006 3:33 pm

"Position Timestamp"this time is not conform to t

Post by cfybyair »

now, the map have created. but the Position Timestamp
is no conform to my time zone. my computer's time is 8:21 AM
the map time is 00:21 AM. somebody knows how to correct.
thanks.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: "Position Timestamp"this time is not conform

Post by Howie »

cfybyair wrote:now, the map have created. but the Position Timestamp
is no conform to my time zone. my computer's time is 8:21 AM
the map time is 00:21 AM. somebody knows how to correct.
thanks.
Can you tell me which time zone (zone name) you are in, which zone is configured on the OS, which operating system and which PHP version?

It's supposed to follow your timezone from the system settings...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
cfybyair
Posts: 27
Joined: Fri Sep 01, 2006 3:33 pm

Post by cfybyair »

GMT+ Beijing,China,Hongkong
my system is win2003 time zone is GMT+ Beijing,China,Hongkong
cacti 0.86i
weathermap 0.82
php 5.1.6
my cacti graphs time is right.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

cfybyair wrote:GMT+ Beijing,China,Hongkong
my system is win2003 time zone is GMT+ Beijing,China,Hongkong
cacti 0.86i
weathermap 0.82
php 5.1.6
my cacti graphs time is right.
Thanks - I'll do some experimenting! :-) This is a new one...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

cfybyair wrote:GMT+ Beijing,China,Hongkong
my system is win2003 time zone is GMT+ Beijing,China,Hongkong
cacti 0.86i
weathermap 0.82
php 5.1.6
my cacti graphs time is right.
I have two things you might like to try to help debugging this:

1. change the format in TIMEPOS to include a %z. So something like:

Code: Select all

TIMEPOS 100 100 Created: %b %d %Y %H:%M:%S %Z
which will show what timezone PHP thinks it is.

2. In Weathermap.class.php, search for function DrawTimestamp and then change the line near the top from:

Code: Select all

	$datestring=strftime($this->stamptext, time());
to

Code: Select all

	$datestring=strftime($this->stamptext);
and try again.

I am lucky enough to live where they invented time ;-) , in GMT, so I don't see this problem, but I know that plenty of other people around the world use local times with no trouble, so there must be a special case here. It might be Windows - it seems that some of the PHP time functions behave differently on Windows.

Please could you let me know the outcome of those two changes?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
cfybyair
Posts: 27
Joined: Fri Sep 01, 2006 3:33 pm

Post by cfybyair »

thanks very much.
when i try it .
I tell the result to you.
cfybyair
Posts: 27
Joined: Fri Sep 01, 2006 3:33 pm

Post by cfybyair »

i do it .
but the time have wrong also. and have some wrong code.
look at the picture.
Attachments
now.JPG
now.JPG (94.9 KiB) Viewed 9218 times
Last edited by cfybyair on Fri Mar 16, 2007 2:09 am, edited 2 times in total.
cfybyair
Posts: 27
Joined: Fri Sep 01, 2006 3:33 pm

Post by cfybyair »

sorry, the picture have some Chinese.I forget.

my area time is "2007-03-16-14:46"
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

cfybyair wrote:sorry, the picture have some Chinese.I forget.

my area time is "2007-03-16-14:46"
Sorry - one last try.. could you please try with %z (lower case) instead of %Z? I think this will show the short 3-letter code for your timezone. I think the mess at the end there is GD failing to support UTF-8. The short names are all regular letters, as far as I know.

I will have my shiny new PC (E6600! :lol: ) working this weekend, so I'll be able to try myself, too.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
cfybyair
Posts: 27
Joined: Fri Sep 01, 2006 3:33 pm

Post by cfybyair »

so good E6600!!!! :o :o :o
somebody like it very much.so do i .
cfybyair
Posts: 27
Joined: Fri Sep 01, 2006 3:33 pm

Post by cfybyair »

this is my conf about Timepos
"TIMEPOS 525 40 Created: %b %d %Y %H:%M:%S %z"
the map time &the really time (system time,time zone) time different 8 ours.
the problems is about time zone. but the problem will come from php.
let me try .
cfybyair
Posts: 27
Joined: Fri Sep 01, 2006 3:33 pm

Post by cfybyair »

i know what happen with my cacti/
PHP5>=5.1.0RC1

find the Module date.timezone

edit it cut ";"
date.timezone="your time zone"
some time zone code :

CET
CST6CDT
Cuba
EET
Egypt
Eire
EST
EST5EDT
Etc/GMT
Etc/GMT+0
Etc/GMT+1
Etc/GMT+10
Etc/GMT+11
Etc/GMT+12
Etc/GMT+2
Etc/GMT+3
Etc/GMT+4
Etc/GMT+5
Etc/GMT+6
Etc/GMT+7
Etc/GMT+8
Etc/GMT+9
Etc/GMT-0
Etc/GMT-1
Etc/GMT-10
Etc/GMT-11
Etc/GMT-12
Etc/GMT-13
Etc/GMT-14
Etc/GMT-2
Etc/GMT-3
Etc/GMT-4
Etc/GMT-5
Etc/GMT-6
Etc/GMT-7
Etc/GMT-8
Etc/GMT-9
Etc/GMT0
Etc/Greenwich
Etc/UCT
Etc/Universal
Etc/UTC
Etc/Zulu
Factory
GB
GB-Eire
GMT
GMT+0
GMT-0
GMT0
Greenwich
Hongkong
HST
Iceland
Iran
Israel
Jamaica
Japan
Kwajalein
Libya
MET
MST
MST7MDT
Navajo
NZ
NZ-CHAT
Poland
Portugal
PRC
PST8PDT
ROC
ROK
Singapore
Turkey
UCT
Universal
UTC
W-SU
WET

I am Chinese,so i in the China now.
so my PHP.INI :
date.timezone = "PRC"

the problem reslove.
thanks Howie.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

cfybyair wrote:i know what happen with my cacti/
PHP5>=5.1.0RC1

find the Module date.timezone

edit it cut ";"
date.timezone="your time zone"
some time zone code :
I am Chinese,so i in the China now.
so my PHP.INI :
date.timezone = "PRC"

the problem reslove.
thanks Howie.
It doesn't use system settings? Oh, that's bad. :P

Thanks for spending the time on it, too :-)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests