Menu

#2654 Replay: fiename not in UTC

2020.3
New
nobody
None
Low
2021-09-07
2021-09-06
No

When saving fgtapes the filename uses the computer's local time, which can cause user confusion because aviation usually uses UTC time.

Discussion

  • Julian Smith

    Julian Smith - 2021-09-06

    I think this could be easily addressed by changing flightgear/src/Aircraft/replay.cxx:makeSavePath() to use gmtime() instead of localtime().

    However i'm not sure whether this should be done by default - should we have a property to control which function to use?

    • Jules
     
  • Anonymous

    Anonymous - 2021-09-06

    Yes, probably should make it opt-in at first. But where to put the option -- in the "Save Tape" dialog?

     
  • James Turner

    James Turner - 2021-09-07

    I'm personally not keen on endless options in the GUI for this kind of thing. It leads to enormous UIs that few people comprehend. Each extra GUI element increases the mental load of opening that dialog.

    The best thing would be to decide one consistent value. Another option could be global setting for 'times in UTC' : eg what do we do when writing a screenshot - do we use UTC ornot? But I'd sooner think about this a bit more holistically.

     
    • Anonymous

      Anonymous - 2021-09-07

      Oh, I forgot about screenshot timestamps, they are affected too. The option could probably be added to Time Settings but then they're about environment, not about file paths etc?

       
  • Julian Smith

    Julian Smith - 2021-09-07

    Very good point.

    Interesting idea about a global 'times in UTC', but i've never seen other programmes that have such a thing.

    However it's fairly common on Unix to have a strftime config setting, so maybe we could have separate strftime format properties for .fgtapes and screenshots, but without GUI settings?

    The code already uses strftime() internally so this would be a simple change to make.

     
  • Julian Smith

    Julian Smith - 2021-09-07

    Oh, sorry, strftime doesn't allow control of whether to use UTC or local time. So it doesn't actually do what we need here. Please ignore last post...

     
  • James Turner

    James Turner - 2021-09-07

    Well we have a few global units settings across the simulator : eg for altitudes in feet vs meters. Conceptually there could be an advanced settings page where the user could select this stuff. But, this is a rather optimistic goal: of the settings we already have, for each place which respects the setting there is another which by oversight does not. All fixable of course but quite a lot of work.

     

Log in to post a comment.

MongoDB Logo MongoDB