aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time.c')
-rw-r--r--kernel/time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/time.c b/kernel/time.c
index 50612faa9baf..848b1c2ab09a 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -132,10 +132,10 @@ SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv,
132 */ 132 */
133static inline void warp_clock(void) 133static inline void warp_clock(void)
134{ 134{
135 struct timespec delta, adjust; 135 struct timespec adjust;
136 delta.tv_sec = sys_tz.tz_minuteswest * 60; 136
137 delta.tv_nsec = 0; 137 adjust = current_kernel_time();
138 adjust = timespec_add_safe(current_kernel_time(), delta); 138 adjust.tv_sec += sys_tz.tz_minuteswest * 60;
139 do_settimeofday(&adjust); 139 do_settimeofday(&adjust);
140} 140}
141 141