Show time in 12 hour (AM/PM) format
Show time in 12 hour (AM/PM) format
As the subject title says, I'm wishing to display the time in a 12 hour (AM/PM) format.....can it be done?
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Show time in 12 hour (AM/PM) format
From https://assets.nagios.com/downloads/nag ... gmain.html
If that does work for you, is it ok if we go ahead and lock the thread?
In case that doesn't work for you, what version of Core are you using? Did you install it from repos or compile from source? On what OS/version are you running Core? This last question will help us figure out how date's are being processed on your system.Format: date_format=<option>
Example: date_format=us
This option allows you to specify what kind of date/time format Nagios should use in the web interface and date/time macros.
If that does work for you, is it ok if we go ahead and lock the thread?
Re: Show time in 12 hour (AM/PM) format
Yeah, had that set already to date_format=usdwhitfield wrote:From https://assets.nagios.com/downloads/nag ... gmain.htmlIn case that doesn't work for you, what version of Core are you using? Did you install it from repos or compile from source? On what OS/version are you running Core? This last question will help us figure out how date's are being processed on your system.Format: date_format=<option>
Example: date_format=us
This option allows you to specify what kind of date/time format Nagios should use in the web interface and date/time macros.
If that does work for you, is it ok if we go ahead and lock the thread?
The system is:
Nagios Core 4.21 ...... compiled from source.
Operating System: CentOS Linux 7 (Core) minimal
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-327.el7.x86_64
Architecture: x86-64
Checking Google I received no joy.
Tried a few changes in php.ini and Apache's config files (SSI directives in particular) without success.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Show time in 12 hour (AM/PM) format
So, unfortunately, it looks like the answer is..."not easily."
The date format code is as follows:
from https://github.com/NagiosEnterprises/na ... fig.c#L994
If you don't want to modify the code yourself, you can post a feature request at https://github.com/NagiosEnterprises/na ... issues/new
Is it ok if we go ahead and lock this up? The github feature request is a better place for people to explain why they want the feature than the forum post.
The date format code is as follows:
Code: Select all
else if(!strcmp(variable, "date_format")) {
if(!strcmp(value, "euro"))
date_format = DATE_FORMAT_EURO;
else if(!strcmp(value, "iso8601"))
date_format = DATE_FORMAT_ISO8601;
else if(!strcmp(value, "strict-iso8601"))
date_format = DATE_FORMAT_STRICT_ISO8601;
else
date_format = DATE_FORMAT_US;
}
If you don't want to modify the code yourself, you can post a feature request at https://github.com/NagiosEnterprises/na ... issues/new
Is it ok if we go ahead and lock this up? The github feature request is a better place for people to explain why they want the feature than the forum post.
Re: Show time in 12 hour (AM/PM) format
Thanks, I'll play with changing the code in a sandbox install and also put in a feature request on github.
Closing thread.
Closing thread.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Show time in 12 hour (AM/PM) format
If you do come up with a fix, definitely post it on github, or just open a new thread. I'm really shocked this hasn't been a request in the past. You can't be the only person that prefers or has users that prefer AM/PM.