nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Changing time from the Konsole

This is a discussion on Changing time from the Konsole within the Linux software forums, part of the Linux Getting Started category; From the kolsole, how to change the time of the server? is it possible to add a cron job, that ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 20-06-2009, 01:11 AM
Junior Member
User
 
Join Date: Jun 2009
OS: Fedora / RHEL 5
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Tawfiq is on a distinguished road
Default [Resolved]Changing time from the Konsole & NTP workaround

From the kolsole, how to change the time of the server? is it possible to add a cron job, that at a certain time the system time will be +1 hour?

OS : Redhat Enterprise 5.0

Thanks in advance.

Last edited by Tawfiq; 21-06-2009 at 11:09 AM.
Reply With Quote
  #2 (permalink)  
Old 20-06-2009, 01:19 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You can use date command to change server time and date. Set time to 6:30:10PM
Code:
date +%T%p -s "6:30:10PM"
You must login as root and 6 (HH), 30 (MM), 10(SS), PM|AM

See Linux Set Date and Time From a Command Prompt

I'm sorry but I don't get your cron related question. Can you provide more info? Do you want to sync clock over the Internet using NTP?
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 21-06-2009, 11:04 AM
Junior Member
User
 
Join Date: Jun 2009
OS: Fedora / RHEL 5
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Tawfiq is on a distinguished road
Default

hey man,
Thanks for your response. The issue is resolved. Here was my scenario,

Server 1 : have NTPD running, configured to take time from ntp.org
Server 2: also have NTPD running
Server 3: also have ntpd running


I did the following things.

Server1: Changed the time manually using the command u provided. Then put the server1's IP at the ntp.conf file. Restarted the ntpd
Server2: Put the Server1's IP in the ntp.conf . The restarted the ntpd
Server3: Put the Server1's IP in the ntp.conf and then restarted the ntpd.

So.. for now, all my servers are taking their time from the Server1. I will keep this as long as we have this +1 DST thing.

Tawfiq
Reply With Quote
  #4 (permalink)  
Old 24-06-2009, 08:28 PM
Junior Member
User
 
Join Date: May 2009
Location: Amsterdam
OS: SUSE
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Clinton is on a distinguished road
Default

You can add this in your cron

crontab -e

then:

0,10,20,30,40,50 * * * * /usr/sbin/ntpdate <yourntpserver> >/dev/null 2>&1
Reply With Quote
Reply

Tags
date , linux set date , linux set time , redhat set date , redhat set time , rhel set date , rhel set time


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Bonding mode not changing bdptcob Linux software 6 18-11-2009 11:50 AM
changing to SU in cronjob xpy Shell scripting 0 16-04-2008 01:29 PM
changing dir sparky Shell scripting 8 30-03-2006 03:14 AM
changing desktop to kde All about FreeBSD/OpenBSD/NetBSD 1 11-01-2006 10:47 PM
linux changing run level Linux software 1 10-01-2006 06:25 PM


All times are GMT +5.5. The time now is 07:01 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38