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)
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Hello
I have log file from solaris system which has date field converted by Java application using System.currentTimeMillis() function, example is 1280943608380 which equivalent to GMT: Wed, 04 Aug 2010 17:40:08 GMT.
Now I need a function in shell script which will convert 1280943608380... (3 Replies)
Dear experts,
I have an epoch time input file such as : -
1302451209564
1302483698948
1302485231072
1302490805383
1302519244700
1302492787481
1302505299145
1302506557022
1302532112140
1302501033105
1302511536485
1302512669550
I need the epoch time above to be converted into real... (4 Replies)
Looking for some help and usually when I do a search this site comes up. Hopefully someone can give me a little direction as to how to use one of these two commands to achieve what I'm trying to do.
What am I trying to do?
I need to take the time value in epoch format returned from the... (5 Replies)
how can i modify the following command to instead provide the epoch time of the interfaces file?
perl -le 'print scalar localtime ((stat "/home/skysmart/interfaces"))'
Tue Feb 19 03:44:52 2013
i'm hoping to get the equivalent of this command:
stat --format=%Y /home/skysmart/interfaces
... (2 Replies)
Team,
I am working on a shell script and i am extracting a date string in "SunOS server" with below format.
Mon Jan 21 04:13:48 EST 2021
Can you please assist me the best way to convert the extracted string to epoch time like "date +%s" in Linux.
Thanks in advance (1 Reply)
Hello Team,
I am stuck in getting the required output in the following case. Please help.
My input file is
aa|08/01/2016
bb|08/15/2016
I wish to convert the file into
aa|epoch time
bb|epoch time
I am using following code: (3 Replies)
Discussion started by: angshuman
3 Replies
LEARN ABOUT REDHAT
datetime
datetime(3) Library Functions Manual datetime(3)NAME
datetime - convert between TAI labels and seconds
SYNTAX
#include <datetime.h>
void datetime_tai(&dt,t);
datetime_sec datetime_untai(&dt);
struct datetime dt;
datetime_sec t;
DESCRIPTION
International Atomic Time, TAI, is the fundamental unit for time measurements. TAI has one label for every second of real time, without
complications such as leap seconds.
A struct datetime variable, such as dt, stores a TAI label. dt.year is the year number minus 1900; dt.mon is the month number, from 0
(January) through 11 (December); dt.mday is the day of the month, from 1 through 31; dt.hour is the hour, from 0 through 23; dt.min is the
minute, from 0 through 59; dt.sec is the second, from 0 through 59; dt.wday is the day of the week, from 0 (Sunday) through 6 (Saturday);
dt.yday is the day of the year, from 0 through 365.
The datetime library supports more convenient TAI manipulation with the datetime_sec type. A datetime_sec value, such as t, is an integer
referring to the tth second after the beginning of 1970 TAI. The first second of 1970 TAI was 0; the next second was 1; the last second of
1969 TAI was -1. The difference between two datetime_sec values is a number of real-time seconds.
datetime_tai converts a datetime_sec to a TAI label.
datetime_untai reads a TAI label (specifically dt.year, dt.mon, dt.mday, dt.hour, dt.min, and dt.sec) and returns a datetime_sec.
SEE ALSO now(3)datetime(3)