john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

date time calendar

[TOC]

command line calendar

cal

show the current month

cal -H 2015-05-06

show the current month and highlight a specific day

cal -m2

show the second month of the current year

cal -3

show the previous month, current month, and next month

cal 2015

show a whole year

Ubuntu Debian Date Time

date -s "14 DEC 2009 02:37:00"

sudo mv /etc/localtime  /etc/localtime-old

sudo ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime


sudo ntpdate pool.ntp.org

synchronize time against the international time servers

/sbin/hwclock --systohc

hardware clock?

CentOS date and time

MANUAL ADJUSTMENT OF LINUX TIME FROM COMMAND LINE

date -s 2159

manually sets the time to 21:59

date -s 123021592009

this means December 30th, 21:59, 2009

yum install tzdata      (this will get the 2009 edition)
tzselect (pretty easy command line menu to pick your current city)

nano /etc/sysconfig/clock

change it from Etc\GMT to Europe/London

ironically after the above and below fixes

service ntpd stop
chkconfig ntpd off

kernel parameters boot/grub/menu.lst

kernel divider=10 clocksource = acpi_pm

initrd
append="clock+pit"

ntp.conf

tinker panic 0 to prevent the local clock from acecssing...

comment out

server 127.127.1.0 # local clock

fudge 127.127.1.0 stratum 10


  • « sed substitute replace text or a line or remove a line or utf-8
  • add ascii character after ascii char »

Published

Jan 1, 2009

Category

linux

~182 words

Tags

  • calendar 3
  • date 10
  • linux 249
  • time 13