Odd data in message box
Ralph DiMola
rdimola at evergreeninfo.net
Fri Oct 16 12:26:36 EDT 2020
This what I get here in the eastern US time zone(gmt-4). Looks Correct to
me.
Command:
put the seconds into x;put convertToLocalTime(x) into y;convert x to
dateitems;convert y to dateitems;put x&cr&y
Message box results:
2020,10,16,12,20,25,6
2020,10,16,16,20,25,6
Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Dan Friedman via use-livecode
Sent: Friday, October 16, 2020 11:46 AM
To: How to use LiveCode
Cc: Dan Friedman
Subject: Odd data in message box
I get a bunch of data from my server. In this array, there are some dates.
I roll through each one converting the date to local time:
function convertToLocalTime sTime //sTime is already been converted to
seconds format
//convert the time using the hour offset for local time zone
put word 6 of the internet date into timeOffset
put (abs(timeOffset))*1 into timeOffset
put timeOffset/100 into timeOffset
if char 1 of timeOffset = "-" then
put ((timeOffset*60)*60) into pTimeOffset
put sTime - pTimeOffset into sTime
else
put sTime + ((timeOffset*60)*60) into sTime
end if
return sTime
end convertToLocalTime
There is no problem with this function, and it's producing the correct time.
However, when it's all said and done, I get this in the message box:
394,2185,1
465,2185,1
253,2185,1
241,2181,1,convertToLocalTime
353,0,0,stack "/Users/Dan1/Desktop/Ignite/MY App/App/main.livecode"
219,2130,9,convertToLocalTime
465,2130,9
253,2130,9
241,2129,1,convertKevinDate
353,0,0,stack "/Users/ Dan1/Desktop/Ignite/MY App/App/main.livecode"
219,38,41,convertKevinDate
119,38,41
118,38,41
118,38,41
465,38,41
241,38,1,FillInData
353,0,0,button id 1410 of card id 1406 of stack "Data Grid Templates
1571787360744" of stack "/Users/Dan1/Desktop/Ignite/MY
App/App/main.livecode"
675,3536,1,FillInData
253,3536,1
253,3536,1
490,3536,1
253,3536,1
Any thoughts?
-Dan
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list