Solved

Changing the date in terminal

Posted on 2002-03-17
3
648 Views
Last Modified: 2006-11-17
Hi folks, I would like to be able to change the date in a terminal window instead of the gui.
I have tried some of the commands but can't seem to get it to work.
%D Date 11/13/55
Is what I have tried plus a few variations.
Any help, greatly appreciated.
Ned
0
Comment
Question by:Ned_Kelly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
hindmost earned 25 total points
ID: 6873866
use date with the -s option
to set the date to 17th of march 2002 you would...
date -s 03182002

the format for the string used is MMDDCCYY
Wher M=Month D=Day in Month C=Century Y=Year. (Century is optional. You can add Hour and minute figures to the string as well.

This will only work if you have the appropriate priveleges to set the system clock. Otherwise you'll get an operation not permitted error.
0
 
LVL 2

Expert Comment

by:hindmost
ID: 6873874
Actually that example will set the date to the 18th of march. but all the rest of the info is correct <g>
0
 

Author Comment

by:Ned_Kelly
ID: 6873885
Thanks hindmost, thats great.
Appreciated very much.
Have a great day and regards Ned
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question