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. QFile save to USB drive uses UTC as date modified

QFile save to USB drive uses UTC as date modified

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 3 Posters 584 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.
  • W Offline
    W Offline
    While_e
    wrote on last edited by While_e
    #1

    Running a BeagleBoneBlack, Debian Jessie, 4.4 Kernel, Qt 5.7

    When I use QFile to save a file to a connected USB drive, it uses the UTC time of the system rather than the local time. I haven't seen anything discussed about this, so I'm curious if anyone else has seen/resolved this issue.

    # date
    Tue Nov  6 11:16:44 EST 2018
    
    # timedatectl
          Local time: Tue 2018-11-06 11:16:54 EST
      Universal time: Tue 2018-11-06 16:16:54 UTC
            RTC time: Tue 2018-11-06 16:16:55
           Time zone: America/New_York (EST, -0500)
    

    So to clarify: If I created a new file at this time, the "date modified" when plugged into another system (Windows/Ubuntu) would reflect 4:16 pm instead of 11:16 am.

    Also, if I simply generate a file with vim to the USB it will have the 11:16 am date/time.

    JonBJ 1 Reply Last reply
    0
    • W While_e

      Running a BeagleBoneBlack, Debian Jessie, 4.4 Kernel, Qt 5.7

      When I use QFile to save a file to a connected USB drive, it uses the UTC time of the system rather than the local time. I haven't seen anything discussed about this, so I'm curious if anyone else has seen/resolved this issue.

      # date
      Tue Nov  6 11:16:44 EST 2018
      
      # timedatectl
            Local time: Tue 2018-11-06 11:16:54 EST
        Universal time: Tue 2018-11-06 16:16:54 UTC
              RTC time: Tue 2018-11-06 16:16:55
             Time zone: America/New_York (EST, -0500)
      

      So to clarify: If I created a new file at this time, the "date modified" when plugged into another system (Windows/Ubuntu) would reflect 4:16 pm instead of 11:16 am.

      Also, if I simply generate a file with vim to the USB it will have the 11:16 am date/time.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @While_e
      Oh, I thought all Unixes saved file times in UTC always....

      1 Reply Last reply
      0
      • W Offline
        W Offline
        While_e
        wrote on last edited by
        #3

        Almost all current version of Unix systems have a way to set 'timezone' and I've never seen any files saved as UTC. Testing between various hosts and clients saving files manually has never caused this.

        aha_1980A 1 Reply Last reply
        0
        • W While_e

          Almost all current version of Unix systems have a way to set 'timezone' and I've never seen any files saved as UTC. Testing between various hosts and clients saving files manually has never caused this.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @While_e

          Does it matter where you save the file, i.e. is the effect on the local (probably ext3) partition the same?

          May it be that timezone is reset within the Qt program? E.g. I know that LC_NUMERIC link is changed after QCoreApplication is set up.

          Just an idea...

          Qt has to stay free or it will die.

          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