LinuxQuestions.org
Help answer threads with 0 replies.
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 02-23-2011, 12:55 AM   #1
linux_
LQ Newbie
 
Registered: Mar 2010
Location: Pune, India
Distribution: Fedora, CentOS, Ubuntu
Posts: 24

Rep: Reputation: 1
Set time format using command


Hello,
I want to know how to set time format (12 hrs or 24 hrs) using command.
I tried this
Code:
date +%T -s "2011-02-23 14:00"
But it only displays 24 hrs format on TERMINAL but it does not SET 24 hrs format on the system
 
Old 02-23-2011, 01:05 AM   #2
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 121

Rep: Reputation: 21
It just sets the date. I suppose you need to use 'set' to modify a environment variable to get 24hr format.
 
Old 02-23-2011, 02:12 AM   #3
mayursingru
Member
 
Registered: Nov 2010
Location: Pune
Distribution: CentOS
Posts: 51

Rep: Reputation: 5
use "system-config-date" to config date and time.
 
Old 02-26-2011, 03:04 AM   #4
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 121

Rep: Reputation: 21
Thumbs down

Quote:
Originally Posted by linux_ View Post
it does not SET 24 hrs format on the system
What do you mean by system? which applications are you checking for date format? If it is the gnome-clock-applet, then it doesn't have a commandline alternative. Maybe
 
Old 02-26-2011, 03:30 AM   #5
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 121

Rep: Reputation: 21
Thumbs down

Quote:
Originally Posted by linux_ View Post
it does not SET 24 hrs format on the system
which applications on the system are you checking for date format? If it is the gnome-clock-applet, then it doesn't have a commandline alternative.
Windows pc have 'regional settings' which control - currency, date format and time format. There is no such alternative in linux.
 
  


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
net time set Command Fails with Success jfmorales Red Hat 1 07-13-2010 01:39 AM
How do i set time in 24 hour format pinga123 Linux - Newbie 9 04-14-2010 12:52 AM
set internet time from command line claudiom56 Linux - Newbie 1 09-02-2009 03:03 AM
date command do not keep time set shanenin Linux - Software 1 09-04-2004 09:16 PM
how set system time by command prompt? yenonn Linux - Newbie 9 08-25-2003 07:40 PM


All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration