The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AIX/awk date to unix timestamp nullwhat UNIX for Advanced & Expert Users 1 12-27-2008 08:12 PM
convert unix date to readable format shary Shell Programming and Scripting 3 10-15-2008 02:16 AM
converting unix timestamp into readable format using c++ uselessprog High Level Programming 3 04-07-2008 03:07 PM
override the system date-timestamp on the Unix servers DavidH UNIX for Dummies Questions & Answers 5 09-27-2007 10:05 AM
getting date from timestamp pavan_test UNIX for Dummies Questions & Answers 2 09-28-2006 12:01 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-17-2009
Rhije Rhije is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 103
Unix timestamp to readable date

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!!
  #2 (permalink)  
Old 01-17-2009
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,209
Code:
echo <unix time> | perl -e 'print localtime(<>) . "\n";'
  #3 (permalink)  
Old 01-17-2009
Rhije Rhije is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 103
haha, well I meant any *nix command that could do it, sorry about that.

I suppose its not that I need a *nix command that does it, perl works just as well. I just wanted to make sure I wasn't missing a command

Thanks reborg!
  #4 (permalink)  
Old 01-18-2009
borderblaster borderblaster is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 48
Try this from the bash shell

date -d @1232144092
  #5 (permalink)  
Old 01-18-2009
Rhije Rhije is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 103
borderblaster - that is awesome!!! Thank you so much!
Closed Thread

Bookmarks

Tags
convert, date, linux, time, unix timestamp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:46 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0