LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-02-2004, 05:03 PM   #1
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Rep: Reputation: 30
I need Help to interpret this time format


I found something interesting in the Mandrake/GNOME in the Time Preferences.

I went in there and I chose UNIX Time and it gave me this format. Could someone please translate this time format into normal time? How would this translate to normal time what do each numbers mean:

Example:

1091482530

When viewing this, my time was set to 21:34:37 UTC when writing the UNIX format.

Of course, technically it does mean 21:34:37 but I want to find out what each number means.

This is rather interesting.
 
Old 08-02-2004, 05:11 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
That is time since the epoch.



Basically it is the seconds since Unix started counting... let me find the exact time that was.

Epoch 00:00:00 UTC, January 1, 1970;

Last edited by frob23; 08-02-2004 at 05:15 PM.
 
Old 08-02-2004, 05:18 PM   #3
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
Code:
% date -r 1091482530
Mon Aug  2 17:35:30 EDT 2004
 
Old 08-02-2004, 05:23 PM   #4
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30
So do you mean its 1091482530 seconds??? or does each number mean anything like date, timezone, etc???

Now is there a way for me to convert this on my Windows machine? If so, how?

Or even a calculator perhaps?
 
Old 08-02-2004, 07:22 PM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Quote:
Originally posted by unixfreak
So do you mean its 1091482530 seconds??? or does each number mean anything like date, timezone, etc???

Now is there a way for me to convert this on my Windows machine? If so, how?

Or even a calculator perhaps?
1. Yes, it means seconds since Jan 1, 1970.

2. I don't understand what you mean by "convert this on my Windows machine", because the current time/date is not dependent on whether you are running Linux or Windows. To say it another way, both Windows and Linux keep track of time, it's just that Linux borrows the Unix standard of measuring the amount of time (in seconds) that has elapsed since Jan 1, 1970. -- J.W.
 
Old 08-02-2004, 08:04 PM   #6
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 47
Quote:
Originally posted by unixfreak
So do you mean its 1091482530 seconds??? or does each number mean anything like date, timezone, etc???

Now is there a way for me to convert this on my Windows machine? If so, how?

Or even a calculator perhaps?

1091482530/60=18191375.5 minutes
18191375.5/60=303189.59167 hours
303189.59167/24=12632.89965278 days
12632.89965278/365=34.61068398021309 years.....give or take a few days because of leap years....
 
Old 08-02-2004, 10:25 PM   #7
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30
i did a Google search regarding conversions here. Take a look at this link below:

http://www.onlineconversion.com/unix_time.htm

This is really cool. Is there a way to download some application that converts UTC Time to UNIX Time on my Windows machine?

Last edited by unixfreak; 08-02-2004 at 11:19 PM.
 
Old 08-03-2004, 12:13 AM   #8
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
That's a cool conversion tool. What's interesting also is that 1 Billion seconds is about 31.7 years, so if you've got that birthday coming up anytime soon, it's worth an extra toast. -- J.W.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
In C, converting time format Miaire Programming 4 02-03-2005 12:25 AM
convert date time format given in string suchi_s Programming 6 01-10-2005 04:06 AM
logging program - time format baronsam Linux - Software 3 12-26-2003 08:14 PM
was able to partition AND format this time!!....BUT..... beginnerx Linux - Newbie 13 10-02-2003 02:24 AM
How to interpret networking addresses in this format 192.168.1.0/24 jdruin Linux - Newbie 1 07-30-2003 11:11 AM


All times are GMT -5. The time now is 09:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration