Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29053 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2012-09-13 11:08 -0600 |
| Last post | 2012-09-13 11:08 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: datetime Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-13 11:08 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2012-09-13 11:08 -0600 |
| Subject | Re: datetime |
| Message-ID | <mailman.620.1347556135.27098.python-list@python.org> |
On Thu, Sep 13, 2012 at 9:19 AM, Max <readmax@hushmail.com> wrote: > How do I set the time in Python? On what platform? I don't know of any libraries for this, so it would be a matter of making the necessary system calls (which is all that a library would do anyway). > Also, is there any *direct* way to shift it? Only by changing the timezone setting. Any method of offsetting the system clock itself is going to involve at some level reading the current value, adding or subtracting, and then setting the new value. > Note that any "indirect" methods may need complicated ways to keep > track of the milliseconds lost while running them. It even took around one > second in some virtual machine guest systems. So I'm hoping Python happens to > have the magic needed to do the job for me. If you're concerned about individual seconds, then you probably should do this in a low-level language like C. Also, the clock is going to drift naturally over time anyway. How are you going to keep it in sync if not with ntp?
Back to top | Article view | comp.lang.python
csiph-web