1
2var rtc = require('rtc');
3
4rtc.start();
5
6var current_time = rtc.getTime();
7console.log('rtc1: current time is ' + current_time);
8
9var my_date = new Date();
10my_date.setFullYear(2008,7,9);
11
12rtc.setTime(my_date);
13
14console.log('Date is ' + my_date.toUTCString());
15
16current_time = rtc.getTime();
17console.log('rtc2: current time is ' + current_time);
18
19rtc.close();