Since you did not provide feedback I tried to figure it out myself. The hex string is the seconds from the UNIX epoch and translates to Sat 17 February 2007 16:53:10 UTC
Hi,
I need to select the entries between two dates from an Oracle db. The Oracle db has a column with Unix timestamps. I use the following querry, but it doesnt seem to be working as desired.
select count(*) from reporter_status where to_char(FIRSTOCCURRENCE, 'mm-dd-yy') between ('08-07-06')... (1 Reply)
Hi
I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source .
Can any one suggest a way a logic to convert such... (5 Replies)
Dear Experts,
I need your help to convert a unix date and time format number in to readable format like dd/mm/yyyy .
I have a text file of more than 10,000 records and it is like
NAME DATE1 COUNTRY DATE2
ABD 1223580395699 USA 1223580395699... (3 Replies)
How would I convert a unix timestamp such as "1232144092" to a readable date such as "1/16/2009 10:14:28 PM" ?
I thought I could use date, but I don't think so now.. Any help would be great!! (4 Replies)
In Unix/Ksh, when I try to look inside a file it says that the file may be a binary file and if I want to see it anyway. When i say 'yes', it shows me the content filled with unreadable symbols (looks like binary). Is there a command that I can run from the Unix prompt to convert/translate that... (3 Replies)
Hi,
I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix.
My requirement here is that i want to do it automatically using a... (5 Replies)
Hi,
I am new to shell scripting and exploring it , I have developed few sample shell script but I have developed them on windows xp notepad and then saving them on folder and then testing them on cywgin and running perfectly...but these scripts are in dos format and I want to convert them in unix... (1 Reply)
I am trying to create a script that will take epoch (input from command line) and convert it into a readable format in bash/shell
---------- Post updated at 08:03 PM ---------- Previous update was at 07:59 PM ----------
#!bin/bash
read -p "Please enter a number to represent epoch time:"... (9 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)
Discussion started by: rahul2662
6 Replies
LEARN ABOUT PLAN9
timegm
TIMEGM(3) Linux Programmer's Manual TIMEGM(3)NAME
timegm, timelocal - inverses of gmtime and localtime
SYNOPSIS
#include <time.h>
time_t timelocal(struct tm *tm);
time_t timegm(struct tm *tm);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
timelocal(), timegm():
Since glibc 2.19:
_DEFAULT_SOURCE
Glibc 2.19 and earlier:
_BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
The functions timelocal() and timegm() are the inverses of localtime(3) and gmtime(3). Both functions take a broken-down time and convert
it to calendar time (seconds since the Epoch, 1970-01-01 00:00:00 +0000, UTC). The difference between the two functions is that timelo-
cal() takes the local timezone into account when doing the conversion, while timegm() takes the input value to be Coordinated Universal
Time (UTC).
RETURN VALUE
On success, these functions return the calendar time (seconds since the Epoch), expressed as a value of type time_t. On error, they return
the value (time_t) -1 and set errno to indicate the cause of the error.
ERRORS
EOVERFLOW
The result cannot be represented.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+----------------------+---------------+--------------------+
|Interface | Attribute | Value |
+----------------------+---------------+--------------------+
|timelocal(), timegm() | Thread safety | MT-Safe env locale |
+----------------------+---------------+--------------------+
CONFORMING TO
These functions are nonstandard GNU extensions that are also present on the BSDs. Avoid their use.
NOTES
The timelocal() function is equivalent to the POSIX standard function mktime(3). There is no reason to ever use it.
SEE ALSO gmtime(3), localtime(3), mktime(3), tzset(3)COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU 2016-12-12 TIMEGM(3)