Wrong timezone returned by Amadeus on On-Demand Flight Status API - amadeus

All the On-Demand Flight Status API requests with Indian airport flight points are returning wrong departure and arrival timings. The timezone is +05:30 for IST but the timezone returned by the APIs is +05:00 and the GMT conversion gets wrong with 30 min delay.
Attached is a sample response for UK 511 / 2022-06-03
The time reported by the API is 2022-06-04T07:10+05:00 for BLR.
The correct time of departure is 2022-06-04T07:10+05:30 for BLR.
API is returning the wrong data for all users. Cross verified with another airline (Air India) as well.

Related

Marketing cloud automation schedule time zone

Data was received from a third party at 6:30 PM GMT.
Automation is scheduled at 8:30 PM (GMT) Dublin, Edinburgh, Lisbon, London
Business unit time zone : (GMT-05:00) Eastern Time (US & Canada)
Query :
SELECT emailaddress,
CAMPAIGN_EXECUTIONDATE
FROM DataExtension
WHERE DATEDIFF(dd,GETDATE(),CAMPAIGN_EXECUTIONDATE)= 0
but it is not getting data from the source DE.
Please suggest what's wrong with the query or something else that I am missing.
Thanks in advance.
I want to run the automation and fetch the data from source data extension and then trigrering the journey via this autimation.
Make sure the data fed to DATEDIFF is of same data type. I guess that's the problem

Query Redis data after elapsed time

I am currently in the midst of a POC where I plan to store some IOT data in my Redis.
Here's my question:
I would like to monitor the data sent by multiple IOT devices and raise alarms if a device fails to report telemetry under a certain time threshold.
For Example:
Device 1: Booting: 09:00am : expected turn around time 2min
After 02 min, 01 sec
Device 1 has failed to report back in the given time.
Is there a way to use Redis to query, in order for it to return back the data which has passed a certain time threshold?
Any references will be appreciated, thanks!

Find current UK time

I'm writing a system which will be used in the US, however it must make reference to the current UK time.
I need an offline solution which will display the current UK time (taking into account GMT and BST)
Is there an inbuilt function in vb.NET which can handle this, or is there a programatic way of retrieving this value?
Dim dt as DateTime
dt = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "GMT Standard Time")
This gets the current time in UTC, and converts it to the time in the United Kingdom. Do not be confused by the wording of the time zone identifier, it indeed covers both GMT and BST, and the transitions between them.

SQL Server Jobs / Schedules - US vs. UK Daylight Savings Adjustment

SQL Server Jobs / Schedules - US vs. UK Daylight Savings Adjustment
We have a UK based server which needs to run a SQL Agent Job at 16:30 (US Central time – this may seem strange but it because of the availability of some data). Usually this wouldn’t be a problem because the time difference between the UK and US is 6 hours so we schedule our job for 22:30.
But because the UK and US adjust their clocks at different times in March and November for daylight savings, there is a 2 week period when the time difference between the UK and US is 5 hours.
I would like to implement a way in which SQL Server could identify this change of time difference and then re-schedule the job it’s self using something like sp_update_schedule.
One approach I have is to get the current timestamp on a US based server and then compare that with the current UK time. If the time difference is 5 hours then reschedule the job to 21:30, if the time difference is 6 hours then reschedule the job to 22:30.
But can anyway suggest another solution, perhaps one which wouldn’t involve get the current timestamp on the US based server and ideally not having to store a list of daylight savings adjustment dates in a table. Something more dynamic maybe?
Actually, it looks like you've mentioned the two viable solutions: Ask a server on that timezone or store a list of critical dates. The party line as to why at the first link below. You can implement your own function (which would have to either store a list of dates or ask a server for the offset). Or you can get a public domain list of time zone information (as at the second link below). There are also several web services which will return offsets. Oracle implements that database of time zones to convert between named time zones, so if you already support both you could do that.
There is a C# implementation that you could wrap in CLR functions at the third link.
http://blogs.msdn.com/b/sqlprogrammability/archive/2008/03/18/using-time-zone-data-in-sql-server-2008.aspx
http://www.twinsun.com/tz/tz-link.htm
http://timezone.codeplex.com/

Calculate Daylight Savings Time (DST) on SQL/Database level

My location in Sydney, Australia. The dates that I explain will be in UK or Australia date format.
Observe the following:
2010-04-15 04:30:00.000 => 15/04/2010 14:30:00 EST (UK date format - Add 10 hours)
2010-11-05 01:00:00.000 => 05/11/2010 12:00:00 EST (UK date format - Add 11 hours)
Both these times are retrieved from the database in UTC format and then calculated on the Web level whether +10 or +11 hour is applicable.
In Australia, Daylight Savings Time (DST) transition dates vary year by year. The transition dates are usually Early April and Late October.
So how accurate would the Web calculation be? If this year the transition date is a few days later (say 03/04/2010), but the Web calculation bases on a fixed date (say 01/04/2010), wouldn't that mean that the days in between will be off by 1 hour when displayed (due to the fixed calculation nature to a specific day of the month)?
I believe the transition dates is not pre-determined and is actually announced to the public. Is that assumption true?
If not (that means the DST dates are pre-determined), would I be able to do the calculation outside the Web level (on the SQL/Database level)?
The database is SQL Server 2005 and I'm using Report Definition Language (RDL) to display the fields in UTC time. If SQL/database level is not the best way, how do I work out +10 or +11 and format the time accordingly to show the right time?
Thank you.
The database is a bad choice for it: it has less information than c# or .net to work it out. .net uses the registry which is kept upto date periodically by patches. SQL Server would have to have a table with date ranges and offsets.
The transitions are fixed because of scheduling (flights, trains ,whatever). IIRC it only changed once at short notice recently in Australia for some Olympic games and it caused chaos around the world. In 2007 the US changed but this was known in advance.
By fixed, it's the "last Sunday" type fixed even if the date varies.
I would leave it in the web code: the DB does not know where your caller is for example, the web site can work it out.
The problem is whoever wrote this app does not quite understand UTC, its value, and how to use it. The database is the correct location for the dat, but the system is not using UTC as intended.
If you use UTC, then all your date arithmetic should use UTC. In the database. It is currently using a saved UTC and then converting at some (doesn't matter if seciond tier or third) other layer; some other library. Half UTC, and Half something else. Have you considered historic dates, as in what is the DATEDIFF() between 15 Feb 2010 and today ?
This eliminates the concern re DST in Australia or Greenland.; and concern re what date/time the changeover actually happens. Everyone is using Greenwich Mean Time for that particular day.
Do all you date arithmetic in the db, in UTC. And display the result (only) in the local time zone, which as you have it, is the web layer, based on the user.
Many systems have dropped that last step altogether, and display in UTC only, regardless of the user's time zone.
The database can handle DST for you. Use its time zone conversion functions to go from whatever zone you stored the dates in to whatever zone you want to get for the user.
MySQL has CONVERT_TZ(), I don't know what other RDBMS's have.