Bug#322261: popularity-contest: hints on translating time_t numbers to dates

2006-03-26 Thread Bill Allombert
On Wed, Feb 08, 2006 at 10:25:05AM -0500, Nathan Stratton Treadway wrote:
 On Thu, Aug 11, 2005 at 03:14:24PM +0200, Bill Allombert wrote:
  On Tue, Aug 09, 2005 at 10:07:41PM -0500, Nathan Stratton Treadway wrote:
   Package: popularity-contest
   Version: 1.28
   Severity: wishlist
   
   
   I was interested in converting the atime and ctime time_t integers found
   in my popularity contest reports into a human-readable date.  I eventually
   ran across the ctime() function in Python's time module which did the
   conversion I wanted, but I wasn't able to find any simple command line
   utility that was able to convert in that direction.  
   
   (For example, the date command's %s format directive will return the
   time_t integer for the date being displayed, but the --date= option
   doesn't seem to let me specify a date using the time_t integer.)
  
  IMHO, this should rather be reported as a wishlist to the date utility.
  You can use 
  date -d $((`date +%s` - $DATE )) seconds ago
 
 For what it's worth, I eventually found that the Info documentation for date
 does contain a page of examples:
   info coreutiles examples of date
 
 That page suggests using the following syntax to do the
 time_t-to-readable conversion:
   date -d 1970-01-01 UTC 1139229934 seconds
 
  perl -e 'print scalar localtime '$DATE',\n'
  where $DATE is the the date you want to convert.
 
 Also good to know.  Thanks.

On Debian unstable, I just found you can do:
% date -d @1139229934
Mon Feb  6 13:45:34 CET 2006
(but it does not work on sarge)

Anyway I will add it to the FAQ. 
Thanks for the info.

Cheers,
-- 
Bill. [EMAIL PROTECTED]

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#322261: popularity-contest: hints on translating time_t numbers to dates

2006-03-26 Thread Bill Allombert
tags 322261 pending
quit
On Wed, Feb 08, 2006 at 10:25:05AM -0500, Nathan Stratton Treadway wrote:
 On Thu, Aug 11, 2005 at 03:14:24PM +0200, Bill Allombert wrote:
  On Tue, Aug 09, 2005 at 10:07:41PM -0500, Nathan Stratton Treadway wrote:
   Package: popularity-contest
   Version: 1.28
   Severity: wishlist
   
   
   I was interested in converting the atime and ctime time_t integers found
   in my popularity contest reports into a human-readable date.  I eventually
   ran across the ctime() function in Python's time module which did the
   conversion I wanted, but I wasn't able to find any simple command line
   utility that was able to convert in that direction.  
   
   (For example, the date command's %s format directive will return the
   time_t integer for the date being displayed, but the --date= option
   doesn't seem to let me specify a date using the time_t integer.)
  
  IMHO, this should rather be reported as a wishlist to the date utility.
  You can use 
  date -d $((`date +%s` - $DATE )) seconds ago
 
 For what it's worth, I eventually found that the Info documentation for date
 does contain a page of examples:
   info coreutiles examples of date
 
 That page suggests using the following syntax to do the
 time_t-to-readable conversion:
   date -d 1970-01-01 UTC 1139229934 seconds
 
  perl -e 'print scalar localtime '$DATE',\n'
  where $DATE is the the date you want to convert.
 
 Also good to know.  Thanks.

OK, I have included this in the FAQ in the package and on the website.
Thanks for providing a solution.

The bug will be closed when the package will be uploaded.

Cheers,
-- 
Bill. [EMAIL PROTECTED]

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#322261: popularity-contest: hints on translating time_t numbers to dates

2006-02-08 Thread Nathan Stratton Treadway
On Thu, Aug 11, 2005 at 03:14:24PM +0200, Bill Allombert wrote:
 On Tue, Aug 09, 2005 at 10:07:41PM -0500, Nathan Stratton Treadway wrote:
  Package: popularity-contest
  Version: 1.28
  Severity: wishlist
  
  
  I was interested in converting the atime and ctime time_t integers found
  in my popularity contest reports into a human-readable date.  I eventually
  ran across the ctime() function in Python's time module which did the
  conversion I wanted, but I wasn't able to find any simple command line
  utility that was able to convert in that direction.  
  
  (For example, the date command's %s format directive will return the
  time_t integer for the date being displayed, but the --date= option
  doesn't seem to let me specify a date using the time_t integer.)
 
 IMHO, this should rather be reported as a wishlist to the date utility.
 You can use 
 date -d $((`date +%s` - $DATE )) seconds ago

For what it's worth, I eventually found that the Info documentation for date
does contain a page of examples:
  info coreutiles examples of date

That page suggests using the following syntax to do the
time_t-to-readable conversion:
  date -d 1970-01-01 UTC 1139229934 seconds

 perl -e 'print scalar localtime '$DATE',\n'
 where $DATE is the the date you want to convert.

Also good to know.  Thanks.

Nathan

Nathan Stratton Treadway  -  [EMAIL PROTECTED]  -  Mid-Atlantic region
Ray Ontko  Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#322261: popularity-contest: hints on translating time_t numbers to dates

2005-08-11 Thread Bill Allombert
On Tue, Aug 09, 2005 at 10:07:41PM -0500, Nathan Stratton Treadway wrote:
 Package: popularity-contest
 Version: 1.28
 Severity: wishlist
 
 
 I was interested in converting the atime and ctime time_t integers found
 in my popularity contest reports into a human-readable date.  I eventually
 ran across the ctime() function in Python's time module which did the
 conversion I wanted, but I wasn't able to find any simple command line
 utility that was able to convert in that direction.  
 
 (For example, the date command's %s format directive will return the
 time_t integer for the date being displayed, but the --date= option
 doesn't seem to let me specify a date using the time_t integer.)

IMHO, this should rather be reported as a wishlist to the date utility.
You can use 
date -d $((`date +%s` - $DATE )) seconds ago
or
perl -e 'print scalar localtime '$DATE',\n'
where $DATE is the the date you want to convert.

Cheers,
-- 
Bill. [EMAIL PROTECTED]

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#322261: popularity-contest: hints on translating time_t numbers to dates

2005-08-09 Thread Nathan Stratton Treadway
Package: popularity-contest
Version: 1.28
Severity: wishlist


I was interested in converting the atime and ctime time_t integers found
in my popularity contest reports into a human-readable date.  I eventually
ran across the ctime() function in Python's time module which did the
conversion I wanted, but I wasn't able to find any simple command line
utility that was able to convert in that direction.  

(For example, the date command's %s format directive will return the
time_t integer for the date being displayed, but the --date= option
doesn't seem to let me specify a date using the time_t integer.)

Anyway, if anyone working on the popcon project has found some easy
way(s) to convert these numbers, it might be worth mentioning it/them in
the documentation somewhere (e.g. in the README along with the
description of the atime and ctime fields, or in the FAQ as a new
question).

Thanks.

Nathan


Nathan Stratton Treadway  -  [EMAIL PROTECTED]  -  Mid-Atlantic region
Ray Ontko  Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239


pgpl5g8AXvGqe.pgp
Description: PGP signature