1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* time.c (localtime_with_gmtoff_zone): musl libc may return NULL for

tm_zone.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-05-01 12:12:25 +00:00
parent bd14f5bf94
commit a4460ddb48
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed May 1 21:11:17 2013 Tanaka Akira <akr@fsij.org>
* time.c (localtime_with_gmtoff_zone): musl libc may return NULL for
tm_zone.
Wed May 1 18:59:36 2013 Benoit Daloze <eregontp@gmail.com>
* enum.c (Enumerable#chunk): fix grammar of error message

5
time.c
View file

@ -1697,7 +1697,10 @@ localtime_with_gmtoff_zone(const time_t *t, struct tm *result, long *gmtoff, con
if (zone) {
#if defined(HAVE_TM_ZONE)
*zone = zone_str(tm.tm_zone);
if (tm.tm_zone)
*zone = zone_str(tm.tm_zone);
else
*zone = zone_str("(NO-TIMEZONE-ABBREVIATION)");
#elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT)
/* this needs tzset or localtime, instead of localtime_r */
*zone = zone_str(tzname[daylight && tm.tm_isdst]);