Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: 12hr date
PostPosted: Thu Feb 09, 2012 12:45 am 
Offline

Joined: Thu Feb 09, 2012 12:43 am
Posts: 1
Website: http://galath.net
I'm wanting to make the 'date' command be 12hr instead of 24hr - is there a way I could do it? I think %I is the correct 12hr instead of %H - but I don't know where to set it.

Thanks


Top
   
 Post subject:
PostPosted: Thu Feb 09, 2012 12:51 am 
Offline
Senior Member

Joined: Wed Jun 08, 2011 11:25 pm
Posts: 51
This is described in man date:
Code:
SYNOPSIS
       date [OPTION]... [+FORMAT]

So you would type date, then a + followed by an appropriate format string. As an example:
Code:
% date +%I 
08


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group