Configuring Card for Last Time Federated Dataset Refreshed Based on Browser Time Zone

Hello,

I am trying to visualize in a card when the last time a federated dataset has been refreshed based on the timezone that a person's browser is set to. For example, if I see that this dataset last updated at 2 PM and I am in the Eastern Timezone, I would want that a person in LA time see that the dataset last updated at 11 AM.

My approach thus far has been trying to use the Activity Log to get the last refresh time but I have been unsuccessful in getting this value due to the federated dataset will only show the last time it was created as the Updated time.

I was thinking of using javascript to get the browser timezone information and then adjust the timezone that way once I could get the timezone. I am open to trying other suggestions as well.

What steps can I take to make this possible?

Answers

  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions

    I believe you can get the timezone in Javsascript using Intl.DateTimeFormat().resolvedOptions().timeZone. See link above.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • Have you considered some type of dropdown where the user can set their timezone in a dropdown and your dashboard adjusts by adding/subtracting from UTC time?

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • Before going down that road of trying to use JavaScript, you may want to check what your company time zone settings are and what a user's Domo time zone settings are.

    Under More → Admin → Company Overview there is a time zone setting that your company can be set to for the default display.

    Each user can have their own time zone setting, which is found by having the user click on their avatar in the top right corner of Domo and then click on the Settings cog icon. They can set their time zone under the Location heading.

    I would try setting a user to Pacific Time and see what time is displayed for the last refresh and see if already says 11am based on that user setting.

    This would potentially save you a lot of trouble.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Hi everyone! Thanks for all your responses. Because the dashboards that I am making are embedded for people worldwide on my company's website, I cannot set each user's timezone on the dashboard as each user is logging in through the company's website and then accessing their data through the embedded dashboard. Moreover, because the dataset that I am using is federated, I am not able to see when the last time the dataset was refreshed. I am thinking that once I am able to get the last refresh time for the federated dataset, I can use any one of the tricks above to get what I am looking for.

    In short, I am hoping that someone can tell me how I can get the last time a federated dataset was refreshed (got new data into Domo) so that I can then use some tricks to showcase the last time the user's data was updated in their timezone.

  • Hi everyone,

    I was thinking of using this solution https://community-forums.domo.com/main/discussion/55095/date-and-time-of-last-update-on-the-dashboard and then with a little javascript, I will be able to adjust to the timezone.

    Is this feasible?