Time zone changes database - timezone

I have stock trading portal and historical prices are kept in local time (say New York, London, Kiev time). But all trades are kept in Moscow time.
Is it possible to get historical timeshifts between Moscow and local markets for a reasonable period - say 10 years back from now?

Related

Scheduling a Cognos report based on Dates from a data warehouse table

We have a report already written for Student Services, but we need to schedule it for specific times in the term; these times are from the date table in our data warehouse. For example, we need it on the first day of the term (one of the MANY dates defined in our date table), and two weeks prior to the first day of the term. If the current date is either one of these dates, we need the report to run; otherwise no. Should I use trigger-based Cognos reporting? Is there a way to do it in regular Cognos scheduling? Should I schedule it out of an external (Oracle) stored procedure?
We were able to set up Event Studio to first have a daily check to see if it is 14 days before term (had to add that to the date table), and 2 weeks after start of term (also in our date table). Set up the run condition, set up tasks for the reports required, then set up the email. Could not set up Run Agent in Event studio (IBM was singularly unhelpful here) so we scheduled it in Cognos. It runs like a charm.

Query working and non working hours average/Percentile utilisation of servers from influxdb over a month

I am using influxdb to store my production servers CPU/MEMORY utilisation.
Recently my customer asked whether it is possible to query out working hours and non working hours average utilisation of all the servers over a period of time or monthly. For ex the if the working hours is 6am - 6pm and non working hours is 6pm - 6am.
Is it possible to query the average utilisation of the servers over a month or certain week or days.
This is not possible with InfluxDB alone, but should be possible with Kapacitor. You need to write TICKScript to filter and tag datapoints as working and non-working hours.
Here is the article that explains how to do exactly that: https://dzone.com/articles/enriching-your-data-with-kapacitor-influxdata

Google Speech API: **Monthly usage is capped at 1 million minutes per month

There is a monthly usage cap at 1 million minutes per month. Does that mean if my users (of my project/app which is using this api) avg. usage is 60 minutes/1 hour per day => 1440 minutes per month, then I can have maximum ~700 (1000,000/1440) users for my apps? If this is right, then my user base can never grow beyond 700 right?
Is my calculation right? or I misread something in the document:
https://cloud.google.com/speech/
In the doc there is
Processing per day 480 hours of audio
"These limits apply to each Cloud Speech API developer project, and are shared across all applications and IP addresses using a given a developer project."
So you might have a problem here.
Does all your use every day 1 hour ?
If yes, you still have the possibility to send a Quota request as written in this page : https://cloud.google.com/speech/pricing
Good luck

How to structure booking app for scheduled tasks?

I want to build a whitelabel booking app for offline services that are organized the team members schedule.
A good example would be a hair salon: There are several team members working for several hours daily and customers can book various services that take different amounts of time to complete. The customers should see which timeslots would still be available to book their services so that the schedules of the team members get filled up automatically.
My questions is: How should I model this in the database? I know this problem has been solved a million times but I could not find any information on a pattern for this.
My Suggestion:
A table that holds all the available timeslots in 10min pieces of all the team members for the next 4 weeks
A cron writes the newly available hours (in 4 weeks) into the table every week
As the customers book services of the lengths of 30min, 60min etc. 3 or 6 of these 10min timeslots are assigned to the order
I hope this makes sense. I would very thankful for hints to any patterns for scheduling apps of critique on my suggestion :)

Should Postgres timezone be changed from UTC?

I have a cron that runs a script in my rails app hourly looking for new transactions to run. Typically this only picks up new transactions set to start on the current day, until midnight UTC, when all the following day's transactions become due. My rails app is operating in Central Time, but Postgres is set to UTC. Since I'm using a scope with a where clause, and now() to compare the dates, transactions for the new day run in the early evening (in the US). Is there a downside to switching Postgres's timezone to Central Time? From what I can tell, it will record all timestamps in UTC regardless, but will run queries based on its timezone setting.
You should always use UTC inside the application, and only perform conversions to other timezones at the edge of the application where necessary - such as in controllers or views.
In your query, perform some date manipulation on now() to translate it to the timezone you need.

Resources