How do I get internet datetime using QT?
-
wrote on 11 Jan 2016, 14:01 last edited by
Hi,
I need to get date-time from internet probably from NIST Internet Time Service (ITS) for embedded Linux device.
I need a QT C++ help and example for this. Any help most appreciated.Kind Regards?
-
Hi,
I need to get date-time from internet probably from NIST Internet Time Service (ITS) for embedded Linux device.
I need a QT C++ help and example for this. Any help most appreciated.Kind Regards?
wrote on 11 Jan 2016, 18:35 last edited by@NTCYP Hi! Someone created a NTP client in Qt -> https://github.com/diorahman/qntp-example
-
@NTCYP Hi! Someone created a NTP client in Qt -> https://github.com/diorahman/qntp-example
wrote on 12 Jan 2016, 13:12 last edited by@Wieland Thank you, but my problem I cannot set the time zone for my embedded linux. There isn't any file /usr/share/zoneinfo/.
So I set the hardware clock to the current system time using below comand.hwclock --systohc
First I get time from my SQL server (which is updated every 15 min) and set it to manualy as;
D_text = ReplaceDate(date.toString("ddd dd/MMMM/yyyy")); ui->labelDate->setText(D_text); showTimeStatus();
and run system command
system("hwclock --systohc").
And worked nicely.
Kind Regards
2/3