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

Tom Lane tgl at sss.pgh.pa.us
Thu Nov 10 23:17:33 UTC 2016

christos at zoulas.com (Christos Zoulas) writes:
> I think it is a good idea to have a tzalloc that auto-refreshes the zone
> file if it has changed. It should fairly straight-forward to implement. I
> propose to make this the default behavior (tzalloc returns a zone that will
> auto-update) since most programs would want that

FWIW, I beg to differ on that.  I know this will break Postgres, which
is doing pretty much the same thing as Emacs, ie relying on a lot of calls
to localtime() to infer the system's active timezone.  We only do that
once during database initialization, so we're not badly exposed, but
nonetheless this is another data point suggesting that programs in the
field do have this assumption.

I think that for backwards compatibility's sake, if nothing else, the
default behavior should be no auto-update.

I concur with Paul's suggestion to make it be controlled by a bit in a
flags word, whichever way the default goes.

Also ... what will you do for localtime() wherein there's no explicit
initialization call whereby callers could say which behavior they want?

			regards, tom lane

More information about the tz mailing list