how to set next 5 days
ZGuo at aws.com
Tue Sep 5 22:24:00 CST 2006
Thank you very much for help.
I want to
date -d '060905 - 4 hours' +%y%m%d%h
But this does not work.
Do you know how to do this?
From: Chris Foote [mailto:chris at inetd.com.au]
Sent: Wednesday, August 23, 2006 2:26 AM
To: Zitian Guo
Subject: Re: how to set next 5 days
On Mon, 21 Aug 2006, Zitian Guo wrote:
> In order to do weather forecast every day, I need to set up beginning and
> time in the script. I can use "data -u %Y%m%d" to set the time for to day,
> how can I set the time for the next 5 day?
Do you really want to set the time or just read it ?
To view the current UTC date:
date -u +%Y%m%d
To view the current UTC date in 5 days time:
date -u +%Y%m%d --date="5 days"
If you wanted localtime instead of UTC, remove the -u switch.
Chris Foote <chris at inetd.com.au>
Inetd Pty Ltd T/A HostExpress
Phone: (08) 8410 4566
This message (including any attachments) is a confidential and privileged communication of
AWS Convergence Technologies, Inc. and intended only for the addressee. Any unauthorized use,
distribution or copying of this message (or any attachment) is prohibited. If you are not the
addressee or a person authorized to receive messages for the addressee, you have received this
message in error. In that case, please delete this message and call us at 301-250-4000 so that we
can correct our records in order to avoid this mistake in the future. Thank you.
More information about the linuxsa