- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Displayed time format
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 09:50 PM
06-12-2002 09:50 PM
I am having a system which display time and date in the following format when I run the date command;
Wed Jun 12 17:39:55 GMT 2002
How do I change it to 12Hours format like this;
Wed Jun 12 5:39:55 GMT 2002
any help would be appreciated.
regards
yihliang
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 10:16 PM
06-12-2002 10:16 PM
Re: Displayed time format
You can display what you want in the following format:
# date "+%a %b %d %I:%m:%S GMT %Y"
Thu Jun 13 04:06:04 GMT 2002
As long your timezone is correct you can do this.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 10:21 PM
06-12-2002 10:21 PM
Re: Displayed time format
I actually need the system to be in 12Hours format ( it is now in 24hours format), and not just displaying the date for one time. i.e. each time i type command 'date' i need the display to be in 12Hours format.
any ideas?
regards
yihliang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 10:44 PM
06-12-2002 10:44 PM
Re: Displayed time format
The system clock runs as a 24 hour clock. There is not a lot you can do about it, unless you wrote some sort of 'c' program that can use the 'ctime' and various other 'time' related libraries. There is man page for 'ctime' have look there for starters.
Why do wish to do this??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 10:52 PM
06-12-2002 10:52 PM
Re: Displayed time format
I got an Oracle database export from another server and I am trying to import it into this server and Oracle saids;
ORA-01874: time zone hour must be between -12 and 13
Oracle action is 'Specify a time zone hour between -12 and 13.'
So I was wondering if the system time format have anything to do with it. Since the diff. bet. the two system is the 12H on one server while the other is 24H format.
any ideas?
regards
yihliang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 11:03 PM
06-12-2002 11:03 PM
Solutionokay... What this is asking for is your timezone. It is asking how many hours + or - you are from GMT. On my site I am -10 hours from GMT.
# echo $TZ
EST-10EDT
Also have a look in either /etc/TIMEZONE and or
/usr/lib/tztab. So as an example I would be -10
HTH
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2002 11:18 PM
06-12-2002 11:18 PM
Re: Displayed time format
System time format has absolutely nothing to do with your Oracle import problem. The format that is used for the 'date' command is determined by the locale you are using.
Use the command 'locale' to check your settings.
It is possible to create your own locales, if you want. Check out the followinf manpages:
localedef(1m)
localedef(4)
Bye,
Rik