Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'subject:Python': 0.06; '51,': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'language.': 0.14; 'helps.': 0.16; 'none.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'utc': 0.16; 'language': 0.16; 'wrote:': 0.18; 'thanks.': 0.20; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; '13,': 0.31; 'object.': 0.31; 'skip:d 20': 0.34; 'subject:the': 0.34; 'something': 0.35; 'but': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'hope': 0.61; 'new': 0.61; 'our': 0.64; 'obtained': 0.96 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: the Gravity of Python 2 Date: Thu, 09 Jan 2014 08:53:28 +0000 References: <78d91$52cbf8e9$541826b9$29485@cache1.tilbu1.nb.home.nl> <4b702$52cc262e$541826b9$22985@cache80.multikabel.net> <4cbf$52cc2e82$541826b9$11761@cache70.multikabel.net> <686$52cd4640$541826b9$21896@cache1.tilbu1.nb.home.nl> <52ce3c6d.8814e00a.3abb.ffff86a7@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-24-220-8.ppp.as43234.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <52ce3c6d.8814e00a.3abb.ffff86a7@mx.google.com> 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389257638 news.xs4all.nl 2878 [2001:888:2000:d::a6]:60465 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63585 On 09/01/2014 06:06, Kushal Kumaran wrote: > > My local copy of the python 3.2.3 docs says: > > classmethod datetime.utcnow() > > Return the current UTC date and time, with tzinfo None. This is like > now(), but returns the current UTC date and time, as a naive > datetime object. An aware current UTC datetime can be obtained by > calling datetime.now(timezone.utc). See also now(). > > Hope this helps. > Blimey, you learn something new everyday, thanks. And it works :) In [7]: datetime.datetime.now(datetime.timezone.utc) Out[7]: datetime.datetime(2014, 1, 9, 8, 51, 13, 945312, tzinfo=datetime.timezone.utc) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence