On 11/10/2016 03:17 PM, Tom Lane wrote:
I think that for backwards compatibility's sake, if nothing else, the default behavior should be no auto-update.
As Christos says, we're talking only about localtime_rz and mktime_z. Emacs uses these on NetBSD, and typically will want autoupdate (because it wants to show the current time in the mode line, for example) but sometimes will not (because it wants to make several related requests to infer time zone rules). The Emacs Lisp API currently does not provide a way to request or to suppress autoupdate, so that will have to be added to the Elisp API regardless of what the tzallocate default is and so this does not give us much guidance on what the tzallocate default should be. localtime and localtime_r could go either way; that is, they can invoke tzallocate and specify the autoupdate flag, regardless of the default. There are reasonable arguments in both directions. Darwin localtime and localtime_r do autoupdate, and grab a lock which is a performance bottleneck in multithreaded applications. NetBSD localtime and localtime_r do not do autoupdate, which fails to track changes. All in all I'm now inclined to say that the default for tzallocate autoupdate should be off, as that's the traditional behavior, but this is merely a mild preference.