9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: ori@eigenstate.org, 9fans@9fans.net
Subject: Re: [9fans] libdate
Date: Sun, 26 Apr 2020 17:18:20 -0700	[thread overview]
Message-ID: <893A52A584CDAA55E0F41DDFB2012BBD@eigenstate.org> (raw)
In-Reply-To: <756B454F0747C231D31E8E3D3AFA3113@eigenstate.org>

> Date handling on plan 9 is almost adequate today if you don't
> have to parse dates or deal with timezones, and don't do
> multithreading. Otherwise, it's difficult to get right, and
> we often don't.

I should have said -- I'm hoping to get some feedback.

The best feedback would be "I don't see how I'd do <thing>",
or "It seems like <manipulations>" would be error prone or
fragile. 

Another problem that I'm not sure how to deal with is that
right now, our timezone database format has two issues:
First, it has no way of mapping from an abbreviated zone.
For example, EST should map to /adm/timezone/US_Eastern,
but that information requires a search of all timezones.

Second, even if we did search all timezones, we're hard
coding a timezone name length of 3, which means that
EST is ambiguous: It maps to US_Eastern, but it also
is used as the name for AEST (Australian East), BRT
(Brazil), and Jamaica.

As a result, if we have a timestamp like this:

	Jan 1 2013, 7:00 PM EST

will not be able to deal with the timezone component.

Extending the length of the name in our current timezone
files will break old binaries that use localtime, since
they'll return an error on timezone naming.

I'm wondering if there are clean approaches to deal
with this.


  parent reply	other threads:[~2020-04-27  0:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26  0:54 libdate ori
2020-04-26  1:54 ` [9fans] libdate tlaronde
2020-04-26  3:08   ` ori
2020-04-26  3:14 ` Calvin Morrison
2020-04-26  3:41 ` cinap_lenrek
2020-04-27  0:18 ` ori [this message]
2020-05-01  0:46   ` ori
2020-05-01  3:15     ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=893A52A584CDAA55E0F41DDFB2012BBD@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).