Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.news.ox.ac.uk!news.ox.ac.uk!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.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.164 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.67; '*S*': 0.00; 'timestamp': 0.16; 'all,': 0.19; 'trying': 0.19; 'value.': 0.19; 'this:': 0.26; 'function': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'gives': 0.31; 'getting': 0.31; 'object.': 0.31; 'convert': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'described': 0.36; 'hi,': 0.36; 'thank': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'range': 0.61; 'first': 0.61; 'you.': 0.62; 'milliseconds': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=DxoxCTJAE99HSXdkiHh4NI4ugbwv7gU9Ov2AOPm67wo=; b=QiJU9K5n7dktQHOD8r0xgWB5MRInukw6a8dgq7CsRQRmBlsCVo4xndHBh1OEzKPbw7 r64WQur8EFQM3P/SZ3eGyEsrMmqMJfKQTD+nN/ie9K1/a5ixLBYG1vjpFUZKpUIVNvxz I0T/loKbNhYURMREc+KW3nD251zgGtQygHCCMO7WoKHVJARe9BU+E1TxjTajP2tBEn1g ZhQbODsxDTMHNEMYQQrP+VWhz9GwiaydeVwWh/ANf+qDhBfmxu2QJVQzh8A3e8mZfTk0 gymXD95tIXFYsDlg8xdXCVPg+Mb5aIvm3NwC1kCuMRviDb6mZxA311Ujs0ZY+5GlJsBx 3B5A== MIME-Version: 1.0 X-Received: by 10.52.89.230 with SMTP id br6mr1134802vdb.20.1393966628407; Tue, 04 Mar 2014 12:57:08 -0800 (PST) Date: Tue, 4 Mar 2014 12:57:08 -0800 Subject: Proper conversion of timestamp From: Igor Korot To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393966637 news.xs4all.nl 2836 [2001:888:2000:d::a6]:44753 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67719 Hi, ALL, I'm getting this: timestamp out of range for platform localtime()/gmtime() function trying to convert the timestamp with milliseconds into the datetime object. The first hit of Google gives me this: http://stackoverflow.com/questions/12458595/convert-epoch-timestamp-in-python but the solution described is not good for me since it does not gives me the milliseconds value. How do I get the proper datetime value including milliseconds from the timestamp? Thank you.