Results 1 to 3 of 3

Thread: Linux, detect DST (daylight saving time)

  1. #1
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Linux, detect DST (daylight saving time)

    How can I detect if Dst is active on a linux machine?

    In windows, using c++builder, I can just query a global var _daylight.

    Thanks.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Linux, detect DST (daylight saving time)

    Nothing to do with Qt.

    You want to retrieve a struct tm using one of the time-related function in glibc:
    Get the time: http://www.delorie.com/gnu/docs/glibc/libc_433.html
    Struct tm docs: http://www.delorie.com/gnu/docs/glibc/libc_435.html
    An example: http://www.delorie.com/gnu/docs/glibc/libc_443.html

  3. #3
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linux, detect DST (daylight saving time)

    Thank you.

Similar Threads

  1. detect system time change
    By ahmdsd_ostora in forum Qt Programming
    Replies: 5
    Last Post: 29th October 2019, 13:04
  2. Replies: 5
    Last Post: 19th November 2010, 03:25
  3. Replies: 2
    Last Post: 5th October 2010, 09:20
  4. Replies: 6
    Last Post: 18th August 2010, 13:52
  5. check the time of last time keyboard is pressed
    By Aki Tomar in forum General Programming
    Replies: 2
    Last Post: 5th February 2008, 10:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.