mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
parse-datetime: don’t depend on tzname
* lib/parse-datetime.y (TIME_ZONE_BUFSIZE): Move earlier. (parser_control) [!HAVE_STRUCT_TM_TM_ZONE]: New member tz_abbr, to save abbrs calculated by strftime %Z. (populate_local_time_zone_table): New function, which optimizes the HAVE_STRUCT_TM_TM_ZONE case as before, and falls back on strftime with %Z otherwise. Although strftime %Z can be more accurate than the old tzname based method, the new heuristic is still wrong so often that it probably doesn’t help all that much. (parse_datetime_body): Use it. * modules/parse-datetime (Depends-on): Remove tzname.
This commit is contained in:
@@ -5,8 +5,8 @@ Files:
|
||||
doc/parse-datetime.texi
|
||||
lib/parse-datetime.h
|
||||
lib/parse-datetime.y
|
||||
m4/tm_gmtoff.m4
|
||||
m4/parse-datetime.m4
|
||||
m4/tm_gmtoff.m4
|
||||
|
||||
Depends-on:
|
||||
assert-h
|
||||
@@ -28,7 +28,6 @@ time-h
|
||||
time_r
|
||||
time_rz
|
||||
timegm
|
||||
tzname
|
||||
|
||||
configure.ac:
|
||||
gl_PARSE_DATETIME
|
||||
|
Reference in New Issue
Block a user