blob: d404212b5e38f30742475bad55b07f468b185872 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- a/util/dvbdate/dvbdate.c
+++ b/util/dvbdate/dvbdate.c
@@ -309,7 +309,10 @@
*/
int set_time(time_t * new_time)
{
- if (stime(new_time)) {
+ struct timespec s = {0};
+ s.tv_sec = new_time;
+
+ if (clock_settime(CLOCK_REALTIME, &s)) {
perror("Unable to set time");
return -1;
}
|