Results 1 to 4 of 4

Thread: setting local timezone so data from GoPro GPS looks correct

  1. #1
    Tuner in Training
    Join Date
    Apr 2021
    Location
    outside Philadelphia PA
    Posts
    33

    setting local timezone so data from GoPro GPS looks correct

    I've got video from my new GoPro 9 with GPS data.
    When I use the "_Timer - DateTime - Updated" to display the current time (current to when the video was captured)
    it displays it as "April 27, 2021 10:15:22" which is accurate according to UTC/GMT time. I'm really in the US Eastern time, so this should be adjusted with -4 or to EDT (Eastern Daylight Time).

    So two questions:
    1) How/where do I specify the local timezone?
    2) how can I change the format? (I'd like to not print the date but keep the time. Even better would be to just use a HH:MM format
    and eliminate the seconds display as well

    Thanks

  2. #2
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    296
    Quote Originally Posted by PatFarrell View Post
    I've got video from my new GoPro 9 with GPS data.
    When I use the "_Timer - DateTime - Updated" to display the current time (current to when the video was captured)
    it displays it as "April 27, 2021 10:15:22" which is accurate according to UTC/GMT time. I'm really in the US Eastern time, so this should be adjusted with -4 or to EDT (Eastern Daylight Time).

    So two questions:
    1) How/where do I specify the local timezone?
    2) how can I change the format? (I'd like to not print the date but keep the time. Even better would be to just use a HH:MM format
    and eliminate the seconds display as well

    Thanks
    These can all be changed in the Enhanced Object Script Editor.

    Clicking the "Open Script Editor" button on the Timer's Object Properties should bring up this window:

    ScriptEditor.png

    Click on the Background Script button to bring up this view:

    BackgroundScript.png

    From here, you can just edit the variables to format the output how you would like. You probably want:

    Code:
    // Preferences
    
    TimeZone = -5; // Set the desired UTC timezone here (-8 for Pacific, -7 Mountain, -6 Central, -5 Eastern)
    IsDST = true; // Set this to "true" if the date was during Daylight Saving Time (ie summer months)
    
    ShowDate = false;
    ShowDateISO = false; // Set to true to show "2018-03-15" instead of "Mar 15, 2018"
    ShowTime = true;
    ShowTimeAmPm = false; // Set to false to use a 24 hour clock
    but you can adjust the TimeZone/IsDST variables to get the correct time. After making adjustments, you can click on the "Update Preview Image" button to refresh the preview with your changes. This is a handy way to make sure that your changes do what you want. If not, then you can just click "Cancel" to back out of the window and lose those changes so that you can start over.

    If those variables don't do it for you, you can adjust the code in the Foreground Script view to output it however you'd like.

  3. #3
    Tuner in Training
    Join Date
    Apr 2021
    Location
    outside Philadelphia PA
    Posts
    33
    Thanks, all that worked. Easy once I found the "open script editor" button and used your sample code as a baseline. Works great.

  4. #4
    Potential Tuner
    Join Date
    Jun 2021
    Posts
    8
    Another way to do it without the scripting is through the "Config" for the data stream - down the bottom, do a "Calculated Field" that adds or subtracts the time zone difference (in seconds - 3600 per hour). Name that as something like "Time - EST" and use that.