Sponsored Content
Full Discussion: Problem with epoch time
Top Forums Shell Programming and Scripting Problem with epoch time Post 302892934 by Akshay Hegde on Sunday 16th of March 2014 05:39:50 AM
Old 03-16-2014
You might be trying something wrong see result here

Code:
[akshay@aix tmp]$ date -d '2014-03-13 20:30:11'
Thu Mar 13 20:30:11 IST 2014

[akshay@aix tmp]$ date -d '2014-03-13 20:30:11' +%s
1394722811

[akshay@aix tmp]$ date -d @$(date -d '2014-03-13 20:30:11' +%s)
Thu Mar 13 20:30:11 IST 2014

[akshay@aix tmp]$ date -d @1394722811
Thu Mar 13 20:30:11 IST 2014

---------- Post updated at 04:09 PM ---------- Previous update was at 04:06 PM ----------

Code:
2014-03-13 20:30:11 != 1394713811052

Code:
$ date --v
date (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Epoch time

Guys, i have a question... I have 2 sets of data say "a" and "a+1" which has values in epoch time.. Question is... if i were to get the time difference where diff = "a+1" - "a" can i convert it back to real time duration after the subtraction... OR i need to convert em first before i do the... (1 Reply)
Discussion started by: 12yearold
1 Replies

2. UNIX for Advanced & Expert Users

Epoch time

Guys, i have a question... I have 2 sets of data say "a" and "a+1" which has values in epoch time.. Question is... if i were to get the time difference where diff = "a+1" - "a" can i convert it back to real time duration after the subtraction... OR i need to convert em first before i do the... (2 Replies)
Discussion started by: 12yearold
2 Replies

3. Shell Programming and Scripting

epoch time

Hi, i need to convert below date/time format into epoch time YYYY-m-d H:M below the example: a=`date +"%F %H:%M"` echo $a Convert $a to epoch time ------------------------------------------------------------------------ lets take an example if $a=1.03 here i want the epoch time... (3 Replies)
Discussion started by: ali560045
3 Replies

4. Shell Programming and Scripting

Convert Epoch time format to normal date time format in the same file

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)
Discussion started by: rk4k
3 Replies

5. Shell Programming and Scripting

Convert Epoch Time to Standard Date and Time & Vice Versa

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)
Discussion started by: DrivesMeCrazy
5 Replies

6. Shell Programming and Scripting

how to convert date time to epoch time in solaris

Hi, Is there any easy way to convert date time(stored in shell variable ) to epoch time in solaris box? As +%s is working on linux but not on solaris, also -d option is not working. Any suggestion please? (6 Replies)
Discussion started by: anshuman0507
6 Replies

7. Shell Programming and Scripting

epoch time

Hi all, I got a file with epoch times like this. 1264010700 1264097400 1263529800 1263762900 1263924300 What I want. I want all epoch times which are > current epoch time written to a file. So everything that is < will be ignored and not written to the file. Thanks (3 Replies)
Discussion started by: stinkefisch
3 Replies

8. Shell Programming and Scripting

Shell script to convert epoch time to real time

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)
Discussion started by: aismann
4 Replies

9. Shell Programming and Scripting

Converting real time to epoch time

# date +%s -d "Mon Feb 11 02:26:04" 1360567564 # perl -e 'print scalar localtime(1360567564), "\n";' Mon Feb 11 02:26:04 2013 the epoch conversion is working fine. but one of my application needs 13 digit epoch time as input 1359453135154 rather than 10 digit epoch time 1360567564... (3 Replies)
Discussion started by: vivek d r
3 Replies

10. Shell Programming and Scripting

Awk: time intervals based on epoch time

I have a list of epoch times delimited by "-" as follows: 1335078000 - 1335176700 1335340800 - 1335527400 1335771300 - 1335945600 1336201200 - 1336218000 The corresponding dates are: 20120422 1000 - 20120423 1325 20120425 1100 - 20120427 1450 20120430 1035 - 20120502 1100 ... (3 Replies)
Discussion started by: alex2005
3 Replies
APSFILTER-BUG(1)					    BSD General Commands Manual 					  APSFILTER-BUG(1)

NAME
apsfilter-bug -- create a half-automatic bug report for apsfilter SYNOPSIS
apsfilter-bug OPTIONS
none DESCRIPTION
With the apsfilter-bug script you can automatically create a bug report for apsfilter(1). A template report file is created which you can edit with your favourite editor ( emacs(1) by default, or whatever is entered in the environment variable EDITOR ). You will see a couple of lines starting with '#'; these lines will be removed before the report is sent. So if you want to use the '#' char- acter at the beginning of a line, just indent it with a space. A very important piece of the bug report is the debugging log created by aps2file(1), probably with a command like aps2file -D -o /dev/null [-P...] [-Z...] [input] 2> log.txt Unless you don't even have a chance to create a debugging log, it is crucial for serious bug hunting. After you have filled in as much (useful) information as possible, you must save the file under its original name, then exit your editor. If you invoked apsfilter-bug by accident, or if you need some additional system information to include into the bug report, just exit your editor without saving the file. NOTES
In addition to the stuff you've edited, some more information is appended to the bug report automatically: apsfilter version 7.2.6-stable ghostscript version (from 'gs --version') system id (from 'uname -a') configure options --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-awk=/usr/bin/awk --with-sendmail=/usr/sbin/sendmail shell executable /bin/bash awk executable /usr/bin/awk sendmail executable /usr/sbin/sendmail FILES
/usr/bin/aps2file script to create debugging output SEE ALSO
apsfilter(1), aps2file(1) BUGS
See apsfilter software center - http://www.apsfilter.org/ - for new versions, bugfixes and known bugs. Please use the new tool apsfilter-bug(1) to release bug- or problem reports. It automatically presents you a form in an editor window which asks you some standard questions. If you save and quit the editor session, then this report is sent automatically via e-mail to the proper apsfilter mailinglist. If apsfilter fails to print something or prints it in a way you wouldn't expect and you want to report an apsfilter error then please save the debugging output of one print session using the new aps2file(1) utility by typing aps2file -D -Z options file > /dev/null 2> file.debug and including the debugging output in the file file.debug into the edit session of the apsfilter-bug utility, so that it is included into the mail to the apsfilter mailinglist. Please note that you need to run /bin/sh (Bourne Shell), bash or a compatible shell, so that the above mentioned output redirection works. Under C-shell (/bin/csh) or tcsh it would't work. If you don't know, then simply make sure you use the Bournce shell by typing /bin/sh or bash, then you should have no problems with redirection of stdout and stderr (> /dev/null 2> file.debug). DOCUMENTATION
See official apsfilter homepage http://www.apsfilter.org/handbook.html Apsfilter Handbook including the Frequently Asked Questions (FAQ) USER FORUM
Please send questions to the official apsfilter help channel apsfilter-help@apsfilter.org. The above section BUGS and the file HOWTO-BUGREPORTS tells you how to report bugs. If you want to know how to troubleshoot your apsfilter installation, please read the manpage aps2file(1) and apsfilter-bug(1) as well as the Apsfilter Handbook carefully. HISTORY
The apsfilter-bug manpage has been written by Michael LoBin <phallobst@web.de> and first appeared in apsfilter V 7.1.0. BSD
Dec 26, 2001 BSD
All times are GMT -4. The time now is 11:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy