I have an app that is used worldwide and I would like to be able to see the time of day the users are using the app in their timezone, currently I get the time in the default UTC for every user.
I know it is possible to change the default timezone I report in to another, but I haven't been able to find anything for changing it to multiple timezones.
Is this possible? If so any help/ any helpful documents I could follow? I'm using SQL in bigquery.
Many thanks,
Related
I have dashboards in AWS QuickSight that use Spice datasets. Occasionally the dashboards do not load data (they seem to refresh forever and never load the data).
Refreshing/closing the browser doesn't seem to help. Eventually the dashboard will load at some point later (don't have a precise time but it will be much longer than a few minutes).
It doesn't happen for all users, at the same time. For example it may happen to me but it works for someone else at the same time (same dashboard).
Normally the Spice dashboards I have are pretty fast.
Thank you!
There is an existing problem in AWS quick sight with Direct query mode, if you use query mode as SPICE this issue gets resolved for more info you can post here as well
https://community.amazonquicksight.com/t/dataset-direct-query-timeout/2703
We are developing an app in dart wherein we need to fetch around more than 50K rows at once (doing it when app loads) and then data will be used in other sections of app for further calculations. We are using Firebase Realtime database and we are facing some serious performance issues.
Its currently taking somewhere around 40 seconds to load 50K rows(currently using free database version, not sure if that would the reason), but we have also observed that when multiple users uses the app, it starts to take around 1 minute 20 sec to load 50K rows and Peak goes to 100%.
Can you please suggest how can we improve performance in firebase realtime database ?
If I break the data in two collection but keep it in same JSON file, would that help ?
Can it be because we are using currently free database version for testing ?
We have tried creating indexes in "Rules" section on 1 Key field but that did not help much. Is there any way we can improve this ?
Can it be because we are using currently free database version for testing?
All Firebase Realtime Database instances run on the same infrastructure. There is no difference based on the plan your project is on.
Can you please suggest how can we improve performance in firebase realtime database?
The best way to improve performance is to only load data that you're going to show to the user right away. In any client-side application it's unlikely that the user will look at 50K items, let alone look at them straight when the application starts.
If you need 50K items to show the initial data to the user, that typically means that you're aggregating that data in some way, and showing that aggregate to the user. Consider doing that aggregation when you write the data to the database, and store the aggregation result in the database. Then you can load just that result in each client, instead of having each client do its own aggregation.
For more data modeling tips, read NoSQL data modeling and watch Firebase for SQL developers. I'd also recommend watching Getting to know Cloud Firestore, which is for Cloud Firestore, but contains many great tips that apply to all NoSQL databases.
I am wanting to create automated reports using the data I have collected with Cumulocity. I would like to automate the creation of the reports so that they aggregate accumulated timeseries, alarm & event data into a single report that could be automatically sent to relevant parties by e-mail on a fixed time interval (weekly, for example).
I understand how to do this with the APIs that Cumulocity provides, but I am interested in experiences of more specific implementations (I imagine I am not the first person thinking about this). Should the data that I want to aggregate be retrieved with CEL (Cumulocity Event Language) and then the report created in the desired format (pdf) with my own script? Is it possible to host this kind of script in Cumulocity or do I have to host it myself?
There is a quite new feature related to the reporting in cockpit (excel/csv export). This can now also be scheduled and send via mail. Maybe this is already something that helps you.
Scheduled export configuration
How to get the Exact time and date of the client area, without depending to the local time & date of client's pc. Even if the time and/or date of that pc is set to a wrong time, I want to show the exact time and date of that timezone at my webpage.
May I calculate it using the server time and timezone of client pc and how? Or any other way to do this?
I want any solution with php, mysql, js or jQuery...
Thank you so much...
If you do it with any server side language like php, it will display server time independent of client's computer. Only client side scripts will display client pc time
like php time()
What you need to do is to guess the clients timezone. You can only make a guess. There are services where you can send the clients IP address to have it guess the geographic location, and from that figure out the timezone. But they are not reliable. The best is if you ask the client what timezone he is in.
You can then use the jstimezonedetect JS library to make a guess and let the user confirm that. Once you then know the clients timezone, you need to convert your servers time to the client time. How to do that is answered here.
My web server is in east coast.
I sent an email from my web server at 1PM PST time which is 4PM Eastern time.
I am resided in west coast and when I see the page, it shows 4PM which is future time for me.
How can I see 1PM, someone in east coast 4PM and so on?
The date is stored in MongoDB which is UTC. I also convert date before displaying:
#Model.DateSent.ToLocalTime().ToString();
This is how I set the time when mail is sent:
DateTime.UtcNow <-- So I am storing date in UTC already
Thanks
There are two parts to your question. The first is the mechanics of localizing a dateTime in C#. Since I'm not a Windows guy, I'll leave that to either someone else to answer or you to look up in the docs, but I'm willing to bet that ToLocalTime() has a friend that takes a TimeZone or a Locale.
The second part, which is more interesting, and something I've had to deal with a few times in the past is how to know what timezone to use. There's no right answer, but there are a few strategies:
The simplest, and perhaps the best, if there's a concept in your system of a user account
is to simply make the Locale a user preference.
If there's no concept of a user account one's always logged into there are a few ways
to go
you could make it a choice that is saved in the session, but that's a bit annoying
to force them to select every time
a better alternative might to be geocode the inbound IP address and set it from
that. There are geocoding apps, databases and services. Most cost, but I know
MaxMind has a free edition that does ok. That will mostly work. The catch is
users coming via some large private network. I live near Philadelphia. My home
network usually geocodes pretty well, though a few services place me in Delaware,
where my ISP is located. But at work, where the whole company goes out through
a single web proxy, I look like I'm in North Dakota.
more reliable, but perhaps more involved, is to grab the browser's timezone
using getTimezoneOffset() in Javascript and push the answer up to the server.
I suppose the other option might be to convert the time locally in the browser,
where the timezone is freely availiable, but that implies that the data is
coming down via AJax or similar and then being updated via JavaScript. Fine if
you're doing a app that is fundimentally Ajax RIA based, just send the data
in UTC or as a time_t. But kind of silly and annoying for a classic web app
that isn't already processing all the data client side.
My first choice would be a user preference. If that's not an option I'd probaly push the timezone from the client. And if that's too involved, go for IP geolocation.