Unix/Linux Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

a simple way of converting a date in seconds to normal date

HP-UX


Tags
perl, perl shift, shift, shift perl

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 11-22-2006   -   Original Discussion by travian
travian travian is offline
Registered User
 
Join Date: Nov 2006
Last Activity: 10 January 2007, 10:36 AM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
a simple way of converting a date in seconds to normal date

Hi all!

I'm working on a HPUX system, and I was wondering if there is a simple way to convert a date from seconds (since 1970) to a normal date.

Thanks
Sponsored Links
    #2  
Old Unix and Linux 11-22-2006   -   Original Discussion by travian
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Advisor  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 26 February 2016, 12:31 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 471 Times in 271 Posts
Pretty easy with perl:
$ perl -e 'print scalar localtime(shift),"\n"' 1164876000
Thu Nov 30 03:40:00 2006

Even if you have not installed a recent version of perl, HP-UX should have an old version in /usr/contrib/bin that is good enough for this.
Sponsored Links
    #3  
Old Unix and Linux 11-23-2006   -   Original Discussion by travian
travian travian is offline
Registered User
 
Join Date: Nov 2006
Last Activity: 10 January 2007, 10:36 AM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks!

It works just fine Linux
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Date format in micro seconds srichunduru Shell Programming and Scripting 2 02-02-2012 07:45 AM
Converting past date to seconds synergy_texas Shell Programming and Scripting 3 03-30-2009 08:02 PM
how to get the milli seconds from date in sun unix r2b Shell Programming and Scripting 1 03-28-2005 05:26 PM
how to get the milli seconds from date in sun unix r2b Solaris 2 03-28-2005 05:15 PM
Translate date value to normal date and backwards. Frederik UNIX for Advanced & Expert Users 4 12-10-2003 03:44 AM



All times are GMT -4. The time now is 05:42 AM.