Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #67735
| References | <CA+FnnTy2zoJYzx+ExkHf8SsENppBLaQzp2zOC9WFYsLBYwK9Qg@mail.gmail.com> <531647BE.70104@mrabarnett.plus.com> <lf5hi6$ve3$2@ger.gmane.org> |
|---|---|
| Date | 2014-03-04 13:57 -0800 |
| Subject | Re: Proper conversion of timestamp |
| From | Igor Korot <ikorot01@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7752.1393970284.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
Mark, On Tue, Mar 4, 2014 at 1:45 PM, Mark Lawrence <breamoreboy@yahoo.co.uk>wrote: > On 04/03/2014 21:38, MRAB wrote: > >> On 2014-03-04 20:57, Igor Korot wrote: >> >>> 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. >>> >>> Are you using Python 2? If yes, then try dividing by 1000.0. >> >> > You learn something new every day, I wasn't aware that you could multiply > or divide timestamps. Of course you can. Its just the number. And this is exactly what happens on the stackoverflow question I referenced in the OP. Problem is I want the milliseconds in the datetime object. Thank you. > > > -- > My fellow Pythonistas, ask not what our language can do for you, ask what > you can do for our language. > > Mark Lawrence > > --- > This email is free from viruses and malware because avast! Antivirus > protection is active. > http://www.avast.com > > > -- > https://mail.python.org/mailman/listinfo/python-list >
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Proper conversion of timestamp Igor Korot <ikorot01@gmail.com> - 2014-03-04 13:57 -0800
csiph-web