]> diplodocus.org Git - nmh/commit
dlocaltime(): Only call tzset(3) once.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 11 Nov 2016 00:38:29 +0000 (00:38 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 11 Nov 2016 00:38:29 +0000 (00:38 +0000)
commitc762fa39172dee2133e0a5d6324464a4fa3cff50
treec1862cecc6aca4569d5ab3c05785e15af737f820
parentb2c1539592ef07b0236cdd974763af75958bfc05
dlocaltime(): Only call tzset(3) once.

This avoids the stat(2) of /etc/localtime per message scan if TZ isn't
set in the environment;  that's the default case on this Linux system.
I can't see a way the TZ environment variable is likely to change
between messages, or that it's intended an invocation of scan(1), say,
copes with the timezone shifting underneath it by /etc/localtime being
changed.
sbr/dtime.c