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


Groups > comp.lang.python > #36000

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

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <d@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; '(so': 0.07; 'suppose': 0.07; '(it': 0.09; 'eat': 0.09; 'timestamp': 0.09; 'assume': 0.11; 'essential': 0.15; 'file,': 0.15; '7pm.': 0.16; 'roy': 0.16; 'seconds,': 0.16; 'subject: \n ': 0.16; 'utc': 0.16; 'wrote:': 0.17; 'differ': 0.17; 'thu,': 0.17; 'widget': 0.17; 'jan': 0.18; 'sort': 0.21; 'supposed': 0.21; 'clock': 0.22; 'tells': 0.22; 'second': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'am,': 0.27; 'opposed': 0.27; "doesn't": 0.28; 'chris': 0.28; 'run': 0.28; '>>>>': 0.29; '"the': 0.29; "i'm": 0.29; 'figure': 0.30; 'resolution': 0.30; 'quickly': 0.32; 'to:addr:python-list': 0.33; 'server': 0.35; 'pm,': 0.35; 'subject:?': 0.35; 'really': 0.36; 'but': 0.36; 'display': 0.36; 'york': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'some': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'notice': 0.39; 'received:192.168': 0.40; 'help': 0.40; 'your': 0.60; 'easy': 0.60; 'between': 0.63; 'to,': 0.65; 'date,': 0.65; 'hours': 0.66; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'smith': 0.71; 'reply-to:no real name:2**0': 0.72; 'day': 0.73; 'article': 0.78; '2013': 0.84; 'received:74.208.4.194': 0.84; 'subject:Using': 0.84
Date Wed, 02 Jan 2013 12:44:57 -0500
From Dave Angel <d@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1
MIME-Version 1.0
To python-list@python.org
Subject 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> <CAPTjJmq=31kspX5tPZp44D7X-sJ7+BLuyUdARE48Zk96scDoAQ@mail.gmail.com>
In-Reply-To <CAPTjJmq=31kspX5tPZp44D7X-sJ7+BLuyUdARE48Zk96scDoAQ@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:Zq6QC8pKUP2yptp5IW9KAxZ4gMo5mvvdMlqu2CsxNg1 oCqlUqV0EjMvf/Z+1M+suqOktNDKnONAzKk8AIIIeN5rjCf9Gq z1cvhC8FjxG3qawve8i03goUGspUwlowMR7v+Fp9270O8+9FZs iroappCB60ZA9WFK6NakAJBFlJr8osBf/hjlEWLaKuMCPL2TU1 WBaiFGosFp3N2yjeTbPISIE6tltvNjToZfki/mktk89X+NNs1k advvyn9JIykr2MtVU0RD0VwBJAd1FaVB0e5TFaOf6D+lep6XcS tYOhNOJm6zrg0xnRJfttmAZzotJtPUxvXjGHqQPxvhRArPM+w= =
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To d@davea.name
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1580.1357148722.29569.python-list@python.org> (permalink)
Lines 38
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1357148722 news.xs4all.nl 6971 [2001:888:2000:d::a6]:34444
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:36000

Show key headers only | View raw


On 01/02/2013 12:34 PM, Chris Angelico wrote:
> 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 :)

Only 20.83 % of the time for that timezone.  You might not notice it if
you always log off by 7pm.

>
> 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


-- 

DaveA

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