Time change Help!
I am having a bit of an issue, I cannot for the life of me get the time to change to show a 12 hour format, It is in the right time zone but i cannot get it to change. I currently use Centos 6.5 with centminmod script LEMP setup. Any advice would be greatly appreciated!
Thanks,
Jake
5 Replies
$ date
Wed Nov 12 00:06:18 EST 2014
$ date +'%a %b %e %I:%M:%S%p %Z %Y'
Wed Nov 12 12:06:20AM EST 2014
What program is it that you need to change the display in?
@vonskippy:
In the console? In a log? Where?
My apologies, I should have been a little more descriptive, this is in the console.
@Vance:
The application you're using should provide a way to alter the display. For the date command, you'd do the following:
$ date Wed Nov 12 00:06:18 EST 2014 $ date +'%a %b %e %I:%M:%S%p %Z %Y' Wed Nov 12 12:06:20AM EST 2014
What program is it that you need to change the display in?
[root@server ~]# date +'%a %b %e %I:%M:%S%p %Z %Y'
Tue Nov 11 11:33:29PM CST 2014
[root@server ~]# date
Tue Nov 11 23:33:33 CST 2014
[root@server ~]#
The issue is I use a forum software, xenforo. As you can see whenever, I issued that command you provided it shows the 12 hour format I am looking for. But entering "date" again resorts back to the default 24 format. I am trying to change this on CentOS, so it displays correctly on my website. I hope that clarifies what issue I am having
Google "xenforo time format" comes up with several hits that seem like what you're looking for.