lkml.org 
[lkml]   [2018]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH] m68k: Fix off-by-one calendar month
    I just noticed that my patch overlooked m68328_hwclk(). Like the other 
    platforms, this one also needs tm_mon decremented.

    Geert, can you amend the commit in your tree or should I submit this
    separately?

    diff --git a/arch/m68k/68000/timers.c b/arch/m68k/68000/timers.c
    index 252455bce144..71ddb4c98726 100644
    --- a/arch/m68k/68000/timers.c
    +++ b/arch/m68k/68000/timers.c
    @@ -125,7 +125,9 @@ int m68328_hwclk(int set, struct rtc_time *t)
    {
    if (!set) {
    long now = RTCTIME;
    - t->tm_year = t->tm_mon = t->tm_mday = 1;
    + t->tm_year = 1;
    + t->tm_mon = 0;
    + t->tm_mday = 1;
    t->tm_hour = (now >> 24) % 24;
    t->tm_min = (now >> 16) % 60;
    t->tm_sec = now % 60;
    --

    \
     
     \ /
      Last update: 2018-04-26 10:24    [W:5.900 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site