I have a simple script that adds one day to a date and returns the next date.
I expect this to return 11/1/12, and it does:
put10/31/12intoaDate
convertaDate toseconds
add 86400 to aDate
convert aDate to short date
return aDate
But change 10/31/12 to 10/31/10 - it returns 10/31/10
It does not
Confirmed with LC 5.5.3. Seems to be a bug.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
There is strangeness sometimes due to system settings for daylight savings,
etc. Since 10/30/10 is actually determined as 10/30/10 12:00 AM an
hours difference can cause problems similar to what you're seeing. Why
does it behave this way on some dates and not others? No clue.
If you want to see
:
http://runtime-revolution.278305.n4.nabble.com/Date-bug-tp4657924p4657928.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe
Bonjour Chipp,
Here, with your script, I get 11/8/10 as expected.
Mac 10.6.5; liveCode 4.5.2
Best regards from Grenoble
Bonne et heureuse année à tous
André
Le 2 janv. 2011 à 05:58, Chipp Walters a écrit :
Hey, can anyone try this or tell me why it doesn't work?
If I use any other date
Hello,
Here the answer is OK also. Mac OS 10.6.5 too. I guess the culprit is not LC,
but what's behind...
Happy New Year
Jacques
Le 2 janv. 2011 à 09:54, André Bisseret a écrit :
Bonjour Chipp,
Here, with your script, I get 11/8/10 as expected.
Mac 10.6.5; liveCode 4.5.2
Best
Interesting.
I wonder if it has anything to do with GMT? I'm -600 and the calc is off by
3600 seconds..? And the folks who are in Europe have no problem with this
script? Maybe Kevin or someone from the mothership can weigh in?
On Sun, Jan 2, 2011 at 3:08 AM, Jacques Hausser
return pDate
end nextDayDate
--
european version.
Kind regards
Bernd
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Date-bug-tp3170675p3170805.html
Sent from the Revolution - User mailing list archive at Nabble.com
On Jan 1, 2011, at 11:58 PM, Chipp Walters wrote:
Hey, can anyone try this or tell me why it doesn't work?
If I use any other date than 11/07/2010, it generates the next date.
But for
some reason Nov 7 doesn't work?
on mouseUp
put 11/07/2010 into tDate
answer nextDayDate(tDate)
end
Sorry: item 3 of the dateItems.
On Jan 1, 2011, at 11:58 PM, Chipp Walters wrote:
Hey, can anyone try this or tell me why it doesn't work?
If I use any other date than 11/07/2010, it generates the next date.
But for
some reason Nov 7 doesn't work?
on mouseUp
put 11/07/2010 into tDate
Hey, can anyone try this or tell me why it doesn't work?
If I use any other date than 11/07/2010, it generates the next date. But for
some reason Nov 7 doesn't work?
on mouseUp
put 11/07/2010 into tDate
answer nextDayDate(tDate)
end mouseUp
function nextDayDate pDate
convert pDate to
Happy New Years, Chipp
I tried a dozen or so dates and they confirmed your findings. Strange. I even
changed the short date to the long date and the abbreviated date. What I'd like
to know is how did you come across this anomaly. If there is one, there must be
more; but which ones. This is
Interesting, it DOES work if you add 3600 to the seconds..not one second
less though: Hmm?
function nextDayDate pDate
convert pDate to seconds
put 3600+60*60*24 into tSecondsInDay
add tSecondsInDay to pDate
convert pDate to short date
return pDate
end nextDayDate
Chipp Walters wrote:
Hey, can anyone try this or tell me why it doesn't work?
If I use any other date than 11/07/2010, it generates the next date. But for
some reason Nov 7 doesn't work?
on mouseUp
put 11/07/2010 into tDate
answer nextDayDate(tDate)
end mouseUp
function nextDayDate
14 matches
Mail list logo