A aviation & planes forum. AviationBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » AviationBanter forum » rec.aviation newsgroups » Piloting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Flights that Cross Midnight



 
 
Thread Tools Display Modes
  #1  
Old May 5th 04, 11:47 PM
ydm9
external usenet poster
 
Posts: n/a
Default Flights that Cross Midnight

I'm not sure where to post this, so please re-direct me if there is a
better place.

I have a project where I have to determine the correct GMT time offset
for the arrive staton of a flight. I'm doing this for a company that
deals with airline carriers all over the world. All that I have to
work with are the depart station, depart station local time, arrive
station, arrive station local time, and the flight effective date
(which is the date the flight departs). The GMT data that I work with
is in local times per the station.

Some thoughts or questions to consider . . .

In order to get the correct GMT offset for the arrive station, I have
to know the correct date to use. This usually is not a problem,
except it can be if a flight crosses over midnight (meaning it will be
the next day at the arrival station) and the flight departed the day
before time change date.

Their current function always gets the GMT based on the effective date
of the flight. This is fine for 99% of the time. When a flight
crosses midnight and it's around time change dates, the effective date
of the flight might need to have a day added to it if the flight
crossed over midnight.

Any input or direction would be greatly appreciated.
  #2  
Old May 6th 04, 12:53 AM
Teacherjh
external usenet poster
 
Posts: n/a
Default


In order to get the correct GMT offset for the arrive station, I have
to know the correct date to use.


Just let your times go past 24:00 and less than 00:00. Then do a check, and
add or subtract a day based on the result. For example, starting with 23:00,
five hours of flight, and a +2 hour offset, you end up with 30:00 on (say)
Tuesday. Then you check to see if the time is 00:00 or =24:00. Since it's
+24:00, add a day and take away 24:00. So now we have 06:00 Wednesday.


Same idea, if you start out at 03:00 Friday, a two hour flight, and a seven
hour offset (the other way) (in the Space Shuttle, presumably!), you end up
with -06:00 (six hours below zero). We check to see if this is 00:00, and if
so, ADD 24:00 and subtract a day. We h ave 18:00 Thursday.

Limit checks like this are common for all date and time conversions (in fact,
any modulo arithmetic with carry). You'll need to check to see if the date
goes past Sunday (day 7) so it can cycle "back" to Monday (day 1), see if you
passed 31 or 30 or 29 or 28 (depending on month and year) so it can cycle back
to the first of Next Month, see if we passed December, etc.

Jose

--
(for Email, make the obvious changes in my address)
  #3  
Old May 6th 04, 01:44 AM
Peter Duniho
external usenet poster
 
Posts: n/a
Default

"ydm9" wrote in message
om...
[...]
Their current function always gets the GMT based on the effective date
of the flight. This is fine for 99% of the time. When a flight
crosses midnight and it's around time change dates, the effective date
of the flight might need to have a day added to it if the flight
crossed over midnight.

Any input or direction would be greatly appreciated.


I think your employers should hire a better programmer.

If you think the problem you're working on now is hard, wait until you have
to deal with a flight that crosses the International Date Line. I'm
guessing your head will explode.

Pete


  #4  
Old May 6th 04, 01:54 AM
Richard Hertz
external usenet poster
 
Posts: n/a
Default


"Peter Duniho" wrote in message
...
"ydm9" wrote in message
om...
[...]
Their current function always gets the GMT based on the effective date
of the flight. This is fine for 99% of the time. When a flight
crosses midnight and it's around time change dates, the effective date
of the flight might need to have a day added to it if the flight
crossed over midnight.

Any input or direction would be greatly appreciated.


I think your employers should hire a better programmer.

If you think the problem you're working on now is hard, wait until you

have
to deal with a flight that crosses the International Date Line. I'm
guessing your head will explode.

Pete


Nice - I was thinking the same thing.





  #5  
Old May 6th 04, 06:34 PM
David Brooks
external usenet poster
 
Posts: n/a
Default

"Peter Duniho" wrote in message
...
"ydm9" wrote in message
om...
[...]
Their current function always gets the GMT based on the effective date
of the flight. This is fine for 99% of the time. When a flight
crosses midnight and it's around time change dates, the effective date
of the flight might need to have a day added to it if the flight
crossed over midnight.

Any input or direction would be greatly appreciated.


I think your employers should hire a better programmer.

If you think the problem you're working on now is hard, wait until you

have
to deal with a flight that crosses the International Date Line. I'm
guessing your head will explode.


That crosses the Date Line overnight. The LA-Auckland flights leave in the
evening and arrive in the morning 2 days later. The return flights leave in
the evening and arrive that same morning.

-- David Brooks


  #6  
Old May 6th 04, 08:21 PM
John Gaquin
external usenet poster
 
Posts: n/a
Default

I recall looking at a flight schedule some years ago for a local carrier in
the Samoa area, I believe. They had a late-night inter-island flight that
arrived the day before it departed.


"David Brooks" wrote in message
If you think the problem you're working on now is hard, wait until you

have
to deal with a flight that crosses the International Date Line. I'm
guessing your head will explode.


That crosses the Date Line overnight. The LA-Auckland flights leave in the
evening and arrive in the morning 2 days later. The return flights leave

in
the evening and arrive that same morning.

-- David Brooks




  #7  
Old May 6th 04, 09:31 PM
Cub Driver
external usenet poster
 
Posts: n/a
Default


They had a late-night inter-island flight that
arrived the day before it departed.


Humberto Ecco spun this conceit into a fat novel called The Island of
the Day Before.

It wasn't very goodl.

all the best -- Dan Ford
email: (put Cubdriver in subject line)

The Warbird's Forum
www.warbirdforum.com
The Piper Cub Forum www.pipercubforum.com
Viva Bush! blog www.vivabush.org
  #8  
Old May 6th 04, 11:51 PM
David Brooks
external usenet poster
 
Posts: n/a
Default

You could fairly easily do that within the continental US.

-- David Brooks

"John Gaquin" wrote in message
...
I recall looking at a flight schedule some years ago for a local carrier

in
the Samoa area, I believe. They had a late-night inter-island flight that
arrived the day before it departed.


"David Brooks" wrote in message
If you think the problem you're working on now is hard, wait until you

have
to deal with a flight that crosses the International Date Line. I'm
guessing your head will explode.


That crosses the Date Line overnight. The LA-Auckland flights leave in

the
evening and arrive in the morning 2 days later. The return flights leave

in
the evening and arrive that same morning.

-- David Brooks






  #9  
Old May 7th 04, 03:14 AM
John Gaquin
external usenet poster
 
Posts: n/a
Default


"David Brooks" wrote in message
news:409ac165

You could fairly easily do that within the continental US.


Technically, yes. I suppose I should have been more precise. This flight
arrived not just "the day before" it departed, but [almost] "a" day before.
IIRC it was about a 30 min flight that arrived about 22 or 23 hours before
it departed.



"John Gaquin" wrote in message
...
I recall looking at a flight schedule some years ago for a local carrier

in
the Samoa area, I believe. They had a late-night inter-island flight

that
arrived the day before it departed.



  #10  
Old May 7th 04, 06:03 PM
ydm9
external usenet poster
 
Posts: n/a
Default

Well aware of the IDL. Programming it is the easy part. Knowing what
to program is the problem. Seeing that I have not received the
solution lets me know that I am in the majority of dumb folks.

"Peter Duniho" wrote in message ...
"ydm9" wrote in message
om...
[...]
Their current function always gets the GMT based on the effective date
of the flight. This is fine for 99% of the time. When a flight
crosses midnight and it's around time change dates, the effective date
of the flight might need to have a day added to it if the flight
crossed over midnight.

Any input or direction would be greatly appreciated.


I think your employers should hire a better programmer.

If you think the problem you're working on now is hard, wait until you have
to deal with a flight that crosses the International Date Line. I'm
guessing your head will explode.

Pete

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
All Vietnam Veterans Were Awarded The Vietnam Cross of Gallantry Otis Willie Naval Aviation 0 May 6th 04 06:56 AM
All Vietnam Veterans Were Awarded The Vietnam Cross of Gallantry Otis Willie Naval Aviation 0 February 16th 04 04:52 AM
All Vietnam Veterans Were Awarded The Vietnam Cross of Gallantry Otis Willie Military Aviation 0 February 16th 04 04:51 AM
All Vietnam Veterans Were Awarded The Vietnam Cross of Gallantry Otis Willie Military Aviation 0 December 1st 03 12:07 AM
Ownership and passengers Roger Long Owning 30 October 11th 03 02:00 PM


All times are GMT +1. The time now is 08:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 AviationBanter.
The comments are property of their posters.