diff options
Diffstat (limited to 'kernel/time.c')
-rw-r--r-- | kernel/time.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/time.c b/kernel/time.c index d226c6a3fd28..c2a27dd93142 100644 --- a/kernel/time.c +++ b/kernel/time.c | |||
@@ -115,6 +115,12 @@ SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv, | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * Indicates if there is an offset between the system clock and the hardware | ||
119 | * clock/persistent clock/rtc. | ||
120 | */ | ||
121 | int persistent_clock_is_local; | ||
122 | |||
123 | /* | ||
118 | * Adjust the time obtained from the CMOS to be UTC time instead of | 124 | * Adjust the time obtained from the CMOS to be UTC time instead of |
119 | * local time. | 125 | * local time. |
120 | * | 126 | * |
@@ -135,6 +141,8 @@ static inline void warp_clock(void) | |||
135 | struct timespec adjust; | 141 | struct timespec adjust; |
136 | 142 | ||
137 | adjust = current_kernel_time(); | 143 | adjust = current_kernel_time(); |
144 | if (sys_tz.tz_minuteswest != 0) | ||
145 | persistent_clock_is_local = 1; | ||
138 | adjust.tv_sec += sys_tz.tz_minuteswest * 60; | 146 | adjust.tv_sec += sys_tz.tz_minuteswest * 60; |
139 | do_settimeofday(&adjust); | 147 | do_settimeofday(&adjust); |
140 | } | 148 | } |