Time

Mike C. Fletcher mcfletch at rogers.com
Mon Jun 3 22:14:14 EDT 2002


Um, actually, you probably want:

datePlus5 = day + RelativeDateTime( days = 5 )

(Note the 's'), without it, you find "day = 5", that is, the 5th of the 
month.

For simple stuff like file-date manipulation, GoldFish can probably just 
use the time module and not need the extra package download.

t = t - (60.0*60*24*5)

Not accurate when Daylight Savings Time switches over, or leap-seconds 
occur, but likely gets the job done for a beginner's web-site scripting.

Enjoy,
Mike

Steve Holden wrote:
...
>>>filename.py is Mon Jun 3 03:25:57 2002 ,if i want to set the time
>>
> forward
> 
>>>or backwards in 5 days time, how can i do that.
>>
> 
> The "mx" way to do what GoldFish wants is to create a
> RelativeDateTime(day=5) and subtract it from the current date.
> 
...

_______________________________________
   Mike C. Fletcher
   http://members.rogers.com/mcfletch/







More information about the Python-list mailing list