[tz] NetBSD vs Darwin timezone API (was: tzdata2016g missing version info)

Tom Lane tgl at sss.pgh.pa.us
Fri Nov 11 04:58:05 UTC 2016


Guy Harris <guy at alum.mit.edu> writes:
> On Nov 10, 2016, at 7:52 PM, Tom Lane <tgl at sss.pgh.pa.us> wrote:
>> Guy Harris <guy at alum.mit.edu> writes:
>>> Why does Postgres need to know the system's active time zone?

>> To select a reasonable default for the "timezone" setting.

> So what are the localtime() calls doing?  Is this an attempt to guess, if the TZ environment variable isn't set, to guess which of the tzdb zones are in effect on the system?  Or is it an attempt to determine the tzdb zone on systems that *don't* use the tzdb for UTC-to-local-time mappings (Windows, HP-UX?, etc.)?  Or is it an attempt to deal with the "time zone abbreviation" case?

First and second of those.  We use the tz database internally, and want
to pick a zone that best matches what we see the system doing, without
assuming that the system is using tz (or maybe it's using a different
version of the tz database than we have).  The matching algorithm
underwent quite some rejiggering when it was developed back in 2004,
but we've heard few complaints since then:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/bin/initdb/findtimezone.c;hb=HEAD

>> But you should think
>> twice about sending email claiming to be from an MIT address out of
>> servers that are not MIT's.  It's a good way to get blocked, and to
>> get your mail provider's servers blocked too.

> What alternative to the MIT Alumni Association's email forwarding service would you suggest to allow me to use an email address independent of my email current service provider (and that would allow me to, if necessary, forward email to that address to more than one other email address, which I've done in the past)?  I'm not doing that just for the lulz.

If their intention is to let their subscribers send mail from anywhere at
all, my suggestion is that they not advertise an SPF record.

			regards, tom lane


More information about the tz mailing list