Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'test,': 0.07; 'differently.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'windows,': 0.09; 'windows': 0.15; 'digits.': 0.16; 'epoch': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'stdlib.': 0.16; 'time.time()': 0.16; 'wrote:': 0.18; 'subject:need': 0.19; 'thu,': 0.19; '>>>': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'resolution': 0.29; 'dec': 0.30; 'gives': 0.31; 'time;': 0.31; 'probably': 0.32; 'subject:the': 0.34; 'subject:from': 0.34; 'problem': 0.35; 'but': 0.35; 'stopped': 0.38; 'needed': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'dave': 0.60; 'ago.': 0.61; "you're": 0.61; '3.4': 0.84; 'angel': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: need to print seconds from the epoch including the millisecond Date: Thu, 26 Dec 2013 23:54:41 -0500 References: <59aa73ac-e06e-4c0e-83a4-147ac42cad2e@googlegroups.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: dpc6744192029.direcpc.com In-Reply-To: User-Agent: Groundhog Newsreader for Android 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388120007 news.xs4all.nl 2876 [2001:888:2000:d::a6]:35145 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62770 On Thu, 26 Dec 2013 20:03:34 -0500, Terry Reedy wrote: > On 12/26/2013 5:48 PM, Dave Angel wrote: > > You're probably on Windows, which does time differently. > With 3.3 and 3.4 on Windows 7, time.time() gives 6 fractional digits. > >>> import time; time.time() > 1388105935.971099 > With 2.7, same machine, I only get 3. The way I recall it, Windows time is a mess. To get better than 10 ms resolution you needed to use time.clock, but that isn't epoch time. Trickier solutions existed, depending on exactly what the problem was. But judging from your test, 3.3 built those gyrations into the stdlib. I dunno, I pretty much stopped using Windows 4 years ago. -- DaveA