Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to localtime get?
Forum Update on Monday, May 27th 2025

How to localtime get?

Scheduled Pinned Locked Moved Unsolved General and Desktop
timeqdatetime
3 Posts 2 Posters 1.3k 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.
  • F Offline
    F Offline
    ForestPoem
    wrote on last edited by
    #1

    It had used the system time so far .

    but.

    i want to change time the localtime.

    QDateTime::currentDateTime

    QDateTime::currentDateTimeUtc()

    Why is not localtime?

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      What do you mean by "local time"?
      QDateTime::currentDateTime returns the current time on the machine on which your application is running.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply
      0
      • jsulmJ jsulm

        What do you mean by "local time"?
        QDateTime::currentDateTime returns the current time on the machine on which your application is running.

        F Offline
        F Offline
        ForestPoem
        wrote on last edited by
        #3

        @jsulm

        QDateTime::currentDateTime is SystemTime

        1 Reply Last reply
        0

        • Login

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