Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How do I get internet datetime using QT?
Forum Update on Monday, May 27th 2025

How do I get internet datetime using QT?

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 4.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NTCYP
    wrote on 11 Jan 2016, 14:01 last edited by
    #1

    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?

    ? 1 Reply Last reply 11 Jan 2016, 18:35
    0
    • N NTCYP
      11 Jan 2016, 14:01

      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?

      ? Offline
      ? Offline
      A Former User
      wrote on 11 Jan 2016, 18:35 last edited by
      #2

      @NTCYP Hi! Someone created a NTP client in Qt -> https://github.com/diorahman/qntp-example

      N 1 Reply Last reply 12 Jan 2016, 13:12
      0
      • ? A Former User
        11 Jan 2016, 18:35

        @NTCYP Hi! Someone created a NTP client in Qt -> https://github.com/diorahman/qntp-example

        N Offline
        N Offline
        NTCYP
        wrote on 12 Jan 2016, 13:12 last edited by
        #3

        @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

        1 Reply Last reply
        0

        2/3

        11 Jan 2016, 18:35

        • Login

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved