Hi,
I want to change time format to AM/PM format. In below output -
I want to be it 4:48:59 PM. NTP is configured on this. Can time format be changed while NTP server is configured ?
Thanks
Have you looked at the options for the date command? You can build almost any format you can think of with the options there. Are there certain options that are not working for you? As an example, you could:-
NTP is not a problem for you. The NTP process manages the system clock, which is not what you see when you use the date command. The system clock is held in seconds from the epoch (or parts of) and the date command reads the system clock, displaying it according to your defined time zone in the format you have specified, or the default if you do not set one. Although the date command reads (or writes) the clock, there is no active relationship between them.
Robin
Last edited by rbatte1; 07-28-2017 at 05:04 AM..
Reason: Comments about NTP
To add to what Robin already said: time is stored in UNIX systems not in a certain format, but a number: the so-called "UNIX time", which counts the seconds since Midnight Jan 1st, 1970. As the time of writing this number is: 1501232481.
Whatever output the date-command (and the system calls it implements) delivers, it is always this number, calculated into a date and then formatted somehow. Therefore a "UNIX-date-format" doesn't exist: the date information is always formatted on the fly to the respective specification (like, as Robin said, the option to the date-command).
Hi All,
I have one file which contains time for request and response.
I want to calculate time difference in milliseconds for each line.
This file can contain 10K lines.
Sample file with 4 lines.
for first line.
Request Time: 15:23:45,255
Response Time: 15:23:45,258
Time diff... (6 Replies)
Greetings!
After block level migration using an external appliance, the luns are getting reported as DGC-RAID5 and these luns are infact from the new storage. I have a query on changing the device Vendor info from DGC-RAID5 to HP3par in the format o/p only.
AVAILABLE DISK SELECTIONS:
... (3 Replies)
Hi, I am extracting a date string from the source file like this :
06/05/2014 16:04:00
I want to change it to 05-JUN-14 04.05.00.000000000 PM
I basically store the date in a variable. I got solutions to change date in dd-mmm-yyyy format using tr but I guess it works only with the "date"... (8 Replies)
Hi
We have upgraded our sun machine from solaris 9 to solaris 10.
Before upgradation the date command output(Solaris 9)
Wed Oct 13 09:45:21 IST 2010
But after upgradation the output for date is as below(solaris 10).
Wednesday, October 13, 2010 9:46:14 AM IST
Looks like I need to... (1 Reply)
Can someone please tell me how to change the time and date format in the menu bar. I get to System Preferences -- Language and Text, format, customize, but I can't figure out what to do next. I want to change, say from Tue May 4 to 5 4 2010. How the heck do I do this? (5 Replies)
Hi friends,
In our cluster some time difference is there. User told me to change into IST time. How can i change the time in a cluster 3.0.
please help me.
thanks to all (1 Reply)
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
I have about 300 files which has the function getDBBackend().
How to write a program to change the empty function from the old format to the new format?
Old empty function format are either:
function getDBBackend()
{
// Not available
} // getDBBackend
or:
function... (0 Replies)