Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Within a computer, natural language is unnatural.


devel / comp.lang.python / Re: Timezone for datetime.date objects

SubjectAuthor
o Re: Timezone for datetime.date objectsPeter J. Holzer

1
Re: Timezone for datetime.date objects

<mailman.98.1646241481.2329.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17273&group=comp.lang.python#17273

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: Timezone for datetime.date objects
Date: Wed, 2 Mar 2022 18:17:54 +0100
Lines: 57
Message-ID: <mailman.98.1646241481.2329.python-list@python.org>
References: <CAEtLV=pV-TP6WuBvoLYNfReHUyjKaJqpRqj0W8kkjeT5eLMJdQ@mail.gmail.com>
<YhvqhXTRobKsoECi@cskk.homeip.net>
<CAPTjJmqLXE+=A6GLLt200Zo0o-E9bS10L1N+5HGchm9DOxrR5A@mail.gmail.com>
<CAEtLV=qYmx9+n15rqbaX7i8RZPs7hnGu_prhYHqdZ671PdTVaw@mail.gmail.com>
<20220302171754.a2w3v4b2uyryj4sz@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="ejvoc7k5dktqy7ul"
X-Trace: news.uni-berlin.de 7nayyFn8uqAnyXdvQzwMIAGulYtj3xqgD0jRpGYO+Qew==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.008
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'content-
type:multipart/signed': 0.05; 'content-type:application/pgp-
signature': 0.09; 'datetime': 0.09; 'filename:fname piece:asc':
0.09; 'filename:fname piece:signature': 0.09;
'filename:fname:signature.asc': 0.09; 'train': 0.09; '"creative':
0.16; '__/': 0.16; 'applies': 0.16; 'challenge!"': 0.16;
'from:addr:hjp-python': 0.16; 'from:addr:hjp.at': 0.16;
'from:name:peter j. holzer': 0.16; 'hjp@hjp.at': 0.16; 'holzer':
0.16; 'reality.': 0.16; 'shortly': 0.16; 'specify': 0.16;
'stross,': 0.16; 'url-ip:212.17.106.137/32': 0.16; 'url-
ip:212.17.106/24': 0.16; 'url-ip:212.17/16': 0.16; 'url:hjp':
0.16; '|_|_)': 0.16; 'wrote:': 0.16; 'to:addr:python-list': 0.20;
'depends': 0.25; 'leave': 0.27; 'bit': 0.27; 'sense': 0.28;
'wrong': 0.28; 'think': 0.32; "doesn't": 0.32; 'everyone': 0.32;
'context': 0.32; 'end.': 0.32; 'but': 0.32; 'subject:for': 0.33;
'same': 0.34; 'mean': 0.34; 'header:In-Reply-To:1': 0.34; '"the':
0.35; 'definitely': 0.35; 'subject:skip:d 10': 0.35; "it's": 0.37;
'could': 0.38; 'means': 0.38; 'beginning': 0.40; 'date.': 0.40;
'should': 0.40; 'skip:0 20': 0.61; 'received:212': 0.62;
'between': 0.63; 'probability': 0.64; 'pay': 0.65;
'received:userid': 0.66; 'day': 0.66; 'time,': 0.67; 'exactly':
0.68; 'smooth': 0.69; 'url-ip:212/8': 0.69; 'period.': 0.76;
'business': 0.77; 'period': 0.81; '(like': 0.84; 'received:at':
0.84; 'somebody': 0.91
Content-Disposition: inline
In-Reply-To: <CAEtLV=qYmx9+n15rqbaX7i8RZPs7hnGu_prhYHqdZ671PdTVaw@mail.gmail.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://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: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20220302171754.a2w3v4b2uyryj4sz@hjp.at>
X-Mailman-Original-References: <CAEtLV=pV-TP6WuBvoLYNfReHUyjKaJqpRqj0W8kkjeT5eLMJdQ@mail.gmail.com>
<YhvqhXTRobKsoECi@cskk.homeip.net>
<CAPTjJmqLXE+=A6GLLt200Zo0o-E9bS10L1N+5HGchm9DOxrR5A@mail.gmail.com>
<CAEtLV=qYmx9+n15rqbaX7i8RZPs7hnGu_prhYHqdZ671PdTVaw@mail.gmail.com>
 by: Peter J. Holzer - Wed, 2 Mar 2022 17:17 UTC
Attachments: signature.asc (application/pgp-signature)

On 2022-02-28 23:28:23 +0100, Morten W. Petersen wrote:
> Well, let's say I specify the datetime 2022-02-22 02:02 (AM). I think
> everyone could agree that it also means 2022-02-22 02:02:00:00, to
> 2022-02-22 02:02:59:59.

I disagree. The datetime 2022-02-22 02:02 specifies a point in time, not
a time period. It means 2022-02-22 02:02:00.000000000.....

In reality, a point in time may be fuzzy. "The train departs at 02:02"
definitely doesn't mean that the train will depart exactly at 02:02:00,
but it also doesn't mean that it will depart between 02:02 and 02:03.
Rather it's a smooth probability distribution starting a bit before
02:02:00 (a train should never leave early, but sometimes clocks are
wrong or somebody doesn't pay attention) a peak shortly after 02:02:00
and a very long tail.

> And I think the same applies for a date.

Depends on the context, but without s specific context (like business
days) I would agree. A day *is* a time period with a beginning and an
end.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

Attachments: signature.asc (application/pgp-signature)
1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor