diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2008-09-29 23:22:41 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2008-09-29 23:22:41 +0000 |
commit | 6d24719167c85165a91a387c4c9af38fa93587e2 (patch) | |
tree | ab0c5b40918bb6b91a2725ea7d65775b80ff3ce6 /lib | |
parent | 2393c943632f78ed38122d24b7d0535fffe6efa3 (diff) |
Made the month days table static const
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parsedate.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/parsedate.c b/lib/parsedate.c index d1d1fdc82..d30286ef5 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -222,10 +222,14 @@ enum assume { DATE_TIME }; -/* struct tm to time since epoch in GMT time zone */ +/* struct tm to time since epoch in GMT time zone. + * This is similar to the standard mktime function but for GMT only, and + * doesn't suffer from the various bugs and portability problems that + * some systems' implementations have. + */ static time_t my_timegm(struct tm * tm) { - int month_days_cumulative [12] = + static const int month_days_cumulative [12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; int month, year, leap_days; |