Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'say,': 0.05; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'interval.': 0.16; 'message-id:@post.gmane.org': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'systems.': 0.18; 'python?': 0.20; 'specified': 0.23; 'second': 0.24; 'machine': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; "i'm": 0.29; 'running': 0.32; 'shift': 0.33; 'to:addr :python-list': 0.33; 'needed': 0.35; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'charset:us-ascii': 0.36; 'virtual': 0.37; 'some': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'lost': 0.60; 'hoping': 0.72; 'milliseconds': 0.84; 'received:is': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Max Subject: datetime Date: Thu, 13 Sep 2012 15:19:32 +0000 (UTC) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 37.130.227.133 (Mozilla/5.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/10.0) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347550804 news.xs4all.nl 6840 [2001:888:2000:d::a6]:34910 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29046 How do I set the time in Python? Also, is there any *direct* way to shift it? Say, it's 09:00 now and Python makes it 11:30 *without* me having specified "11:30" but only given Python the 2h30m interval. Note that any "indirect" methods may need complicated ways to keep track of the milliseconds lost while running them. It even took around one second in some virtual machine guest systems. So I'm hoping Python happens to have the magic needed to do the job for me.