I can get the time up to the closest second with the time module, but not to the millisecond. When I use time.strftime, I don't know how many milliseconds are left over to use them.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kent Johnson Sent: Sunday, 7 September 2008 21:04 PM To: [EMAIL PROTECTED] Cc: [email protected] Subject: Re: [Tutor] Support for datetime module On Sun, Sep 7, 2008 at 6:17 AM, Johan Geldenhuys <[EMAIL PROTECTED]> wrote: > Thanks Kent, > > Let me explain what I need it for. > > I have a systemUpTime is seconds that I got from a SNMP agent. > > I want to work out when the system uptime began and want to put that in ISO > format time to the millisecond. > > So my idea is to take a timestamp in seconds when I get the systemUpTime. I > subtract the uptime from my timestamp and then format that into ISO format. > That should give me a fairly accurate UTC-like time of when the systemUpTime > began. > Here is an example: "2008-09-04 22:29:43.221 Z" I think you can do all that with functions in the time module. Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
