Comments (13)
- Is it displayed wrong only on one page or everywhere? Can you try a
%> perl -e 'print scalar localtime()."\n"'
does it print the correct time? Have you checked the "datetime_format*" settings? - Yes it should. I will fix this.
from thruk.
everywhere.
[@zjm_20_201 Thruk]# perl -e 'print scalar localtime()."\n"'
Sun Oct 17 17:01:08 2010
datetime_format = %Y-%m-%d %H:%M:%S
datetime_format_today = %H:%M:%S
datetime_format_long = %a %b %e %H:%M:%S %Z %Y
datetime_format_log = %B %d, %Y %H
datetime_format_trends = %a %b %e %H:%M:%S %Y
from thruk.
- seems like these are the default values. Is the time correct when you issue the command?
- its fixed in the latest git version.
from thruk.
yes, issuing the print scalar localtime command in perl gives the correct time. but everywhere in Thruk it's 14 hours ago.
from thruk.
Perl uses the TZ environment to determine the timezone, is it set somewhere?
%>TZ=EST perl -e 'print scalar localtime()."\n"'
Mon Oct 18 02:19:33 2010
Or could you set it for Thruk? For example in the ./script/thruk_fastcgi.pl. Depending on what script you use to start Thruk.
Just add a line at the top of the file after the #!.../perl
$ENV{'TZ'} = 'EST';
from thruk.
I tried
%>TZ='Asia/Shanghai' perl -e 'print scalar localtime() . "\n"'
and it gives the correct time.
i then added a line $ENV{'TZ'} = 'Asia/Shanghai' to ./script/thruk_fastcgi.pl, after restarting httpd, nothing has been changed.
but I noticed one exception, in status.cgi, it's correct time at the upperleft corner(curr network status):
Last Updated: Mon Oct 18 16:04:27 CST 2010
Updated every 90 seconds
Thruk 0.72 - www.thruk.org
but in the table below and in extinfo.cgi, the times are 14 hours ago.
from thruk.
Do you use the "use_timezone" in your nagios.cfg? Does Nagios display the correct time and which timezone does Nagios use? Is Nagios on the same box as Thruk?
When you take a look at the status.dat, are the times correct?
You can convert the timestamps with:
perl -le "print scalar localtime 123456789"
from thruk.
I didn't use 'use_timezone' in nagios.cfg. Nagios CGIs display the correct time.
Nagios and Thruk are on the same box.
timestamps are correct in status.dat
from thruk.
Ok, i found something. Could you try the latest git version? You can now set the timezone in your thruk_local.conf by adding:
use_timezone=Asia/Shanghai
from thruk.
latest version works well without use_timezone=Asia/Shanghai in thruk_local.conf.
thanks very much for fixing this:)
from thruk.
The "use_timezone" replaces the temporary workaround with adding the ENV{'TZ'} in your start script.
Thanks for reporting this issue.
from thruk.
in 'Event Log' /'Notifications'/'Alerts' pages, the navigation default period is from 14:00 to 14:00 tomorrow, which is weird. I remembered of this 14 hours ago problem and wondering if they're related with each other.
changing use_timezone doesn't help.
from thruk.
Hello sni,
I've found this problem is caused by Date::Manip for improperly translating Asia/Shanghai.
trying replacing Asia/Shanghai by Asia/Hong_Kong resolve this. I've submmited a bug report to the author of Date::Manip.
==UPDATE==
oh no, it is fixed when perl version>=5.10, but I've 5.8.8......
from thruk.
Related Issues (20)
- Excel Export doesn't contain characters like ä ö ü HOT 1
- Debian repos have incorrect libthruk file HOT 4
- Config Tool: Dependency -> Hostdepenceny -> dependent_host_name: List Wizzard? HOT 1
- Config Tool: service without any hosts cannot be selected anymore
- Bug: empty contact groups after config reload results HOT 1
- The Quick Search (add_search) area of the menu is always the color of the header, not the navbar. HOT 2
- Bug: "host_custom_variables" : null
- Invalid URL in tactical view -> service notification disabled HOT 1
- Bug: Rescheduling a check changes URL
- Dynamic Business Process title
- Panorama dynamic backgroup coloro
- logcache conection deprecated
- Redirect to login screen doesn't work HOT 1
- Thruk -> mklivestatus -> Nagios 4.5.x HOT 2
- Service parents are not validated correctly HOT 2
- Recurring Downtime for Host and all Services HOT 3
- Multiple concurrent CGI calls locks server up
- reports sometimes do not show the graph pnp4nagios HOT 3
- How to escape "!" in service arguements? HOT 4
- Distributed service / role aggregated statistics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thruk.