SysV-derived Unix does not have a stat command. Only the latest Solaris 11 has got it.
I would try perl.
leads to
for the stat() and localtime() functions.
I pasted the examples, and with a little trial and error I got
Now you can make it executable and run it with
These 3 Users Gave Thanks to MadeInGermany For This Post:
Hi,
I have a file say abc. I get the timestamp in following way:
ls -ltr abc | awk -F" " '{print $6,$7,$8}'
Mar 8 10:23
I need to get the timestamp as :
03-08-2007 10:23:00
Thanks
Sumeet (1 Reply)
hi everyone, im new here and am in desperate need of help. I want to convert my 32 bit unix time stamp ' 45d732f6' into a readable format (Sat, 17 February 2007 16:53:10 UTC) using c++.
I have looked around the interent but i just cant make sense of anything. All examples i can find just... (3 Replies)
Hi All,
I have a string like below.
"Mar 31 2009" .
I want to convert this to unix time .
Also please let me know how to find the unix time for the above string minus one day. For Eg. if i have string "Mar 31 2009" i want to find the unix time stamp of "Mar 30 2009".
Thanks in advance,... (11 Replies)
Hello,
How do I convert unix timestamp value to 'normal' date format - to get year month and day values ?
Looks like it's easy to do using GNU date (linux systems). But how do I do tthis on AIX ?
I don't want to write C program, any ways to do that using unix shells ?
thanks (1 Reply)
Hello Experts,
I have a timestamp(6) column in a .csv data file , format of the data is as below:-
ETCT,P,Elec, Inc.,abc,11/5/2010 4:16:09.000000 PM,Y,Y,Y
I want the timestamp column to be properly formatted like
11/05/2010 04:16:09.000000 PM
Currently the "0" is missing with... (3 Replies)
Hi all,
I'm a Unix newbie and I need to get file timestamp in the following format:
YYYYMMDD HH24:MM:SS
example:
20120713 18:49:30
For start I've tried the following code, but I don't know how to display the year and even format the date:
ls -l $filename | awk '{print $7 $6 $8}'
My... (4 Replies)
Hello I have a file : file1.txt with the below contents :
237176 test1 test2 1442149024
237138 test3 test4 1442121300
237171 test5 test7 1442112823
237145 test9 test10 1442109600
In the above file fourth field represents the timestamp in Unix format.
I found a command which converts... (6 Replies)
Hello All,
I have a date in DD/MM/YYYY format. I am trying to convert this into unix timestamp. I have tried following:
date -d $mydate +%s
where mydate = 23/12/2016 00:00:00
I am getting following error:
date: extra operand `+%s'
Try `date --help' for more information.
... (1 Reply)
Discussion started by: angshuman
1 Replies
LEARN ABOUT DEBIAN
net::gpsd3::return::unknown::timestamp
Net::GPSD3::Return::Unknown::Timestamp(3pm) User Contributed Perl Documentation Net::GPSD3::Return::Unknown::Timestamp(3pm)NAME
Net::GPSD3::Return::Unknown::Timestamp - Net::GPSD3 Return Base Class with Timestamp
SYNOPSIS
package XXX;
use base qw{Net::GPSD3::Return::Unknown::Timestamp};
DESCRIPTION
Provides a time, timestamp and datetime methods to a GPSD3 Return object.
METHODS
time
Seconds since the Unix epoch, UTC. The value may have a fractional part of up to .01sec precision.
Note: In 2.96 (protocol 3.4) the TPV->time format changed from unix epoch to W3C, but this method attempts to hide that change from the
user.
Since the POSIX standard for the Unix epoch does not use leap seconds but GPS system does I do not recommend that you use this method for
time display or storage. This method is purely here for backwards compatibility.
timestamp
W3C formated timestamp value either directly from the protocol >= 3.4 or calculated < 3.4. The value may have a fractional part of up to
.01sec precision.
Note: I expect that in protocol 3.5 the value will be passed directly as TPV->timestamp
datetime
Returns a DateTime object
BUGS
Log on RT and Send to gpsd-dev email list
SUPPORT
DavisNetworks.com supports all Perl applications including this package.
Try gpsd-dev email list
AUTHOR
Michael R. Davis
CPAN ID: MRDVT
STOP, LLC
domain=>michaelrdavis,tld=>com,account=>perl
http://www.stopllc.com/
COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Net::GPSD3, Net::GPSD3::Return::Unknown, DateTime::Format::W3CDTF, DateTime
perl v5.14.2 2011-12-27 Net::GPSD3::Return::Unknown::Timestamp(3pm)