FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 01-02-2010, 09:44 PM
Gilbert Sebenste
 
Default I thought Y2K was over with?

Apparently not. On a command line, type:

date '+%G'

First Spamassassin's bug (now fixed, type "sa-update" as user root),
and now this...

************************************************** *****************************
Gilbert Sebenste ********
(My opinions only!) ******
************************************************** *****************************
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-02-2010, 09:49 PM
Benjamin Donnachie
 
Default I thought Y2K was over with?

2010/1/2 Gilbert Sebenste <sebenste@weather.admin.niu.edu>:
> Apparently not. On a command line, type:
> date '+%G'

Looks perfectly correct to me - from man strftime

%G is replaced by a year as a decimal number with century. This year
is the one that contains the greater part of the week (Monday as
the first day of the week).

Maybe you want %Y?

%Y is replaced by the year with century as a decimal number.

Ben
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-02-2010, 09:50 PM
Gilbert Sebenste
 
Default I thought Y2K was over with?

On Sat, 2 Jan 2010, Benjamin Donnachie wrote:

> 2010/1/2 Gilbert Sebenste <sebenste@weather.admin.niu.edu>:
>> Apparently not. On a command line, type:
>> date '+%G'
>
> Looks perfectly correct to me - from man strftime
>
> %G is replaced by a year as a decimal number with century. This year
> is the one that contains the greater part of the week (Monday as
> the first day of the week).
>
> Maybe you want %Y?
>
> %Y is replaced by the year with century as a decimal number.
>
> Ben

Ahhhh, that explains it. You are correct! Never mind. Thanks for the
pointer!

************************************************** *****************************
Gilbert Sebenste ********
(My opinions only!) ******
************************************************** *****************************
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-02-2010, 10:32 PM
Stephen Harris
 
Default I thought Y2K was over with?

On Sat, Jan 02, 2010 at 04:44:38PM -0600, Gilbert Sebenste wrote:
> Apparently not. On a command line, type:
>
> date '+%G'

This is, I believe, correct. We're in ISO week 53 of year 2009

% date +"%V %G -- %c"
53 2009 -- Sat Jan 2 18:29:48 2010

% date +"%V %G -- %c" -d "today + 1 day"
53 2009 -- Sun Jan 3 18:29:59 2010

% date +"%V %G -- %c" -d "today + 2 days"
01 2010 -- Mon Jan 4 18:30:06 2010

--

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org