ClockDrifting » History » Version 3
sb1066 -, 2010-10-29 07:24
| 1 | 1 | sb1066 - | If your clock is getting out of sync the best thing would be to use an ntp server. But since that require a internet connection I wrote a small script that uses the time table transmitted by the DVB providers instead. |
|---|---|---|---|
| 2 | |||
| 3 | {{{ |
||
| 4 | #!/bin/bash |
||
| 5 | |||
| 6 | 2 | sb1066 - | UTC=`/usr/bin/dvbsnoop -N 1 0x14 | /bin/grep 'UTC_time' | /bin/cut -c27-45` |
| 7 | 1 | sb1066 - | date --utc --set="${UTC}" |
| 8 | }}} |
||
| 9 | |||
| 10 | In order for this to work you need: |
||
| 11 | * a DVB card in your computer (obviously). |
||
| 12 | 3 | sb1066 - | * [http://dvbsnoop.sourceforge.net/ dvbsnoop] installed. |
| 13 | 1 | sb1066 - | * rights to change the clock |
| 14 | * to have your bios set to UTC time (and correct timezone in linux) |