[Fwd: Re: [clug][unclas] Calculating the actual date and time]

Basil Chupin blchupin at tpg.com.au
Thu Mar 15 05:19:58 GMT 2007


Ooops, I didn't check to see if this reply would also get to the list. A 
copy now below.


Cheers.


-------- Original Message --------
Subject: 	Re: [clug][unclas] Calculating the actual date and time
Date: 	Thu, 15 Mar 2007 15:39:11 +1100
From: 	Basil Chupin <blchupin at tpg.com.au>
To: 	Ranner, Frank MR <Frank.Ranner at defence.gov.au>
References: 	<3497E314EE23D54EACE26B5CFFD896980A6115 at drnrxm01.drn.mil.au>



Ranner, Frank MR wrote:
>> -----Original Message-----
>> From: 
>> linux-bounces+frank.ranner=defence.gov.au at lists.samba.org 
>> [mailto:linux-bounces+frank.ranner=defence.gov.au at lists.samba.
>> org] On Behalf Of Basil Chupin
>> Sent: Wednesday, 14 March 2007 23:00
>> To: linux at lists.samba.org
>> Subject: [clug] Calculating the actual date and time
>>
>> I am using Mozilla and looking inside the bookmarks.html I 
>> can see, for example, an entry against one of the URLs I 
>> visited as being
>> "LAST_ACCESSED: 1168396306", and another one "ADD_DATE: 791585666" 
>> (which I gather is the date I added it to my bookmarks).
>>
>>     
>
> The following works on solaris systems which have a braindead date
> command
> without any gnu extensions.
>
> Perl:
>
> $ perl -e 'print localtime(1168396306)."\n"'
> Wed Jan 10 13:31:46 2007
>
> Without newline:
> $ perl -e "print scalar localtime(791585666)"
> Wed Feb  1 07:54:26 1995$ 
>
> TCL
>
> $ tclsh
> % clock format 1168396306
> Wed Jan 10 13:31:46 EST 2007
>   

Thank you Frank and thanks to all those who replied to my question.

(Frank, I think there is a typo in the first statement - with the "\n" 
in it - because I get an error message when trying to use it.)

I used the statement-

date --date=@<seconds>

to calculate the real date/time - this statement is the easiest to 
remember <g>.

I also used the URL, epoch_conversion, which Tony provided and this 
really created a big question mark about how reliable/accurate this 
calculation business really is.

By this I mean that using 'date --date=' for 1168396306 seconds I get-

10 January 2007 13:31:46 EST <================= NOTE: not EDT, daylight 
saving time, even though my clock is set to EDT

but when using the epoch converter I get this-

9 January 2007 09:31:46 GMT <===============epoch converter gives time 
as GMT

but this GMT time cannot be correct - unless I have missed something 
(never been good when dealing with time zones).

I also determined that in Firefox it is the local time (the time set on 
the computer) which is used to timestamp a bookmark when it is created 
and when the URL it represents is (last) accessed.

Again, thank you all for providing me with the (most valuable) information.

Cheers.

-- 
Never believe anything until it's been officially denied.





-- 
Never believe anything until it's been officially denied.




More information about the linux mailing list