Created
December 11, 2019 11:46
-
-
Save hnw/2b7e2035c1efccaa13ccb940b599faca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** ext/date/lib/unixtime2tm.c~ 2019-08-28 12:01:15.000000000 +0900 | |
--- ext/date/lib/unixtime2tm.c 2019-12-11 20:37:52.000000000 +0900 | |
*************** | |
*** 56,61 **** | |
--- 56,67 ---- | |
cur_year += YEARS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD); | |
tmp_days -= DAYS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD); | |
} | |
+ printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year); | |
+ if (ts >= 0 && tmp_days == 0) { | |
+ cur_year -= YEARS_PER_LYEAR_PERIOD; | |
+ tmp_days += DAYS_PER_LYEAR_PERIOD; | |
+ } | |
+ printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year); | |
TIMELIB_DEBUG(printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year);); | |
if (ts >= 0) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment