Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35999

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

References <dfd18cf3-e2c0-4f0e-a4c1-a72924039a15@googlegroups.com> <roy-358706.09280402012013@news.panix.com> <mailman.1574.1357138278.29569.python-list@python.org> <kc1qm2$mb7$1@panix2.panix.com>
Date 2013-01-03 04:34 +1100
Subject Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1579.1357148075.29569.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Jan 3, 2013 at 4:27 AM, Roy Smith <roy@panix.com> wrote:
> In article <mailman.1574.1357138278.29569.python-list@python.org>,
> Chris Angelico  <rosuav@gmail.com> wrote:
>
>>> I assume you mean timestamps. A date doesn't need to worry about UTC
>>> the way a timestamp does.
>
> I'm not sure how a date and a timestamp differ in any significant
> way.  A date is just a very low-precision time.
>
> I suppose what's really essential is a way to quickly see the current
> UTC time.  That way, when you're looking at some event in a log file,
> it's easy to figure out, "that was 20 minutes ago", as opposed to,
> "that was 5 hours and 20 minutes ago".  I run my desktop in New York
> time (so I know when I'm supposed to eat lunch), but I also have a
> second clock widget displaying UTC time just below it.  Right now,
> it's 17:22.

The difference between "20 minutes ago" and "5 hours and 20 minutes
ago" doesn't really come up when your resolution is 86400 seconds, as
is the case with a date :)

I have the same sort of thing. My desktop's clock is on local time
(4:33AM), but my server tells me, when I type 'who', that "The current
UTC (GMT) time is: Wed 17:33:35" (it doesn't bother with the date,
only the day of week, as the main purpose of that time display is to
help people synchronize on weekly events).

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Using mktime to convert date to seconds since epoch - omitting elements from the tuple? Victor Hooi <victorhooi@gmail.com> - 2013-01-02 00:01 -0800
  Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple? Vlastimil Brom <vlastimil.brom@gmail.com> - 2013-01-02 09:33 +0100
  Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple? Dave Angel <davea@dejaviewphoto.com> - 2013-01-02 09:06 -0500
  Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple? Roy Smith <roy@panix.com> - 2013-01-02 09:28 -0500
    Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple? Chris Angelico <rosuav@gmail.com> - 2013-01-03 01:51 +1100
      Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple? roy@panix.com (Roy Smith) - 2013-01-02 12:27 -0500
        Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple? Chris Angelico <rosuav@gmail.com> - 2013-01-03 04:34 +1100
        Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple? Dave Angel <d@davea.name> - 2013-01-02 12:44 -0500
  Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple? Barry Scott <barry@barrys-emacs.org> - 2013-01-03 23:46 +0000

csiph-web