diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-02-28 12:53:16 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-02-28 13:29:18 +0900 |
commit | 32f356e84a2079b1a68b056b5b150eb80928b185 (patch) | |
tree | b9bfd20eeaf4df0846db00fd6bd0163e017284f5 /time.c | |
parent | 1cb67905337100015c6845cdb4be2bc2133014ea (diff) |
Fix a typo of macro name
When the date is 28 Feb in the local timezone and 27 in the UTC,
the leap second info is wrongly calculated, and the Time for 1 Mar
created with a timezone resulted in an invalid date, 30 Feb.
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1110,7 +1110,7 @@ gmtime_with_leapsecond(const time_t *timep, struct tm *result) result->tm_yday = leap_year_p(result->tm_year + 1900) ? 365 : 364; } else if (result->tm_mday == 1) { - const int8_t *days_in_month = days_in_month_of(result->tm_year + 1900); + const int8_t *days_in_month = days_in_month_in(result->tm_year + 1900); result->tm_mon--; result->tm_mday = days_in_month[result->tm_mon]; result->tm_yday--; |