Sponsored Content
Full Discussion: epoch time in shell script
Operating Systems Solaris epoch time in shell script Post 302182467 by Franklin52 on Sunday 6th of April 2008 04:42:59 PM
Old 04-06-2008
If your date version support these options you can try this:

Code:
date +%s -d "01/01/2000 00:00:00"

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Convert from standard epoch time from a shell script?

Is there an easy method to do an on the fly conversion of a standard epoch time (seconds from 1970) to more readable date format? Does Unix have anything built in to do this? (4 Replies)
Discussion started by: LordJezo
4 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 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

5. 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

6. Shell Programming and Scripting

need shell or Perl script to get the epoch time automatically

I need shell or Perl script to get the epoch time automatically Example I need to execute mysql command to delete content less then given epoch time If date is 01-07-2010 (dd-mm-yy) epoch should be lees 7 days mean 23-06-2010 for 23-06-2010 I need epoch time Delete BS_table where... (1 Reply)
Discussion started by: sreedhargouda
1 Replies

7. 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

8. Shell Programming and Scripting

Shell Script for Epoch Time Conversion

Hi there I came across this script online to convert Epoch time to proper date format, but I am receiving the following error Also, I have HISTTIMEFORMAT set in user's .profile so that their history output shows time stamps. Additionally I have changed their .history location to a dedicated... (9 Replies)
Discussion started by: hedkandi
9 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
LedgerSMB::Locale(3pm)					User Contributed Perl Documentation				    LedgerSMB::Locale(3pm)

NAME
LedgerSMB::Locale - Locale handling class for LedgerSMB SYNOPSIS
Locale support module for LedgerSMB. Uses Locale::Maketext::Lexicon as a base. METHODS
get_handle ($language_code) Returns a locale handle for accessing the other methods. Inherited from Locale::Maketext. text ($string, @params) Returns the translation for the given string. This is a legacy wrapper that merely calls $self->maketext. date ($myconfig, $date, $longformat) Returns the given date after formatting it. $longformat is a ternary flag that determines how the date is formatted. If $longformat is true, the date will be given in the form of "_('September') 23 2007". If $longformat is false but defined, the date will be in the form of "_('Sep') 23 2007" unless the date is given in the form 'yyyy.mm.dd', in which case it is returned as-is. If $longformat is not defined, the date will be output in the format specified by $myconfig->{dateformat}. Copyright (C) 2006, The LedgerSMB core team. #==================================================================== # # Locale support module for LedgerSMB # LedgerSMB::Locale # # LedgerSMB # Small Medium Business Accounting software # http://www.ledgersmb.org/ # # # Copyright (C) 2006 # This work contains copyrighted information from a number of sources # all used with permission. It is released under the GNU General # Public License Version 2 or, at your option, any later version. # See COPYRIGHT file for details. # # This file contains source code included with or based on SQL-Ledger # which is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 # and licensed under the GNU General Public License version 2 or, at # your option, any later version. For a full list including contact # information of contributors, maintainers, and copyright holders, # see the CONTRIBUTORS file. # # Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork): # Copyright (C) 2000 # # Author: DWS Systems Inc. # Web: http://www.sql-ledger.org # # Contributors: Thomas Bayen <bayen@gmx.de> # Antti Kaihola <akaihola@siba.fi> # Moritz Bunkus (tex) # Jim Rawlings <jim@your-dba.com> (DB2) # #==================================================================== perl v5.14.2 2012-06-01 LedgerSMB::Locale(3pm)
All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy