| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
| |
Unlike the current code, it does no looping to count days or do
table lookups, which means running time doesn't increase with year
or month. A good thing if it's call a lot, especially if the
algorithm were asked to compute dates centuries or more from the
epoch start.
As a bonus, handles negative time values.
Change-Id: I198a23daf621e40623e6b44dacf2387078b4db9c
|
| |
|
|
|
|
|
|
|
|
|
| |
Some drivers set tm_wday just fine and do not need it coerced to
be correct. Others set tm_yday, so don't overwrite what the driver
sets; just zero it inside if it can't fill the field. Move calls
to set_day_of_week() to the sorts of drivers that presumably
required the hammer (FS#11814) in get_time() where the weekday
isn't locked to the date.
Change-Id: Idd0ded6bfc9d9f48fcc1a6074068164c42fcf24a
|
| |
|
|
|
|
| |
since WEEK_SECONDS = 7 * DAY_SECONDS, the result is the same
Change-Id: Iec161fc2de626c99c1aabf80ab1d3243eac602d9
|
| |
|
|
| |
Change-Id: I9a5f29ad73b5620096d38874c70351db9bd90062
|
| |
|
|
| |
Change-Id: Idcebdf0ae120cfc82a1f471d0553d23ca36d7eef
|
|
|
Change-Id: I00a09ae28a68f8153fb8fa854fea741ddfb0bf09
Reviewed-on: http://gerrit.rockbox.org/175
Tested-by: Bertrik Sikken <bertrik@sikken.nl>
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Reviewed-by: Rafaël Carré <rafael.carre@gmail.com>
|