Re: LiveCode convert seconds to dateItems - year is out by 19?

2021-05-11 Thread Keith Clarke via use-livecode
According to the Dictionary "LiveCode uses midnight, January 1, 1970 as the 
start of the eon. Date and time functions are computed from that date.” This is 
the same as MacOs, according to fandom "The epoch of Mac OS X 
, macOS 
, and most Unix 
-based systems begins at midnight on 
January 1, 1970 ."

This got me thinking - that this project's files may be on my Mac but courtesy 
of our work Google Drive via Google FileStream. And according to the wires, 
FileStream does strange things with creation date on hosting systems. So, I 
moved the project folder structure from to my Mac’s Documents folder area 
(ironically, also backed up - this time to iCloud) and everything is working!

I’ll be glad when I finish the project and can deploy it to a standalone that 
run on a dedicated Raspberry pi without all the ‘helpful’ infrastructure! 

Thanks all for the help.
Best,
Keith 

> On 11 May 2021, at 14:58, Terence Heaford via use-livecode 
>  wrote:
> 
> Could it be something to do with the base date on the mac vs the base date of 
> live code?
> 
> I believe the base date on a mac is 1970, not sure what it is in live code?
> 
> Terry
> 
>> On 11 May 2021, at 13:59, Keith Clarke via use-livecode 
>>  wrote:
>> 
>> Thanks Martin & Alex,
>> 
>> I wasn’t aware of ‘the seconds’ - thanks that’s behaving correctly here. 
>> 
>> Tracing back from this date conversion being OK to the tCreateDate variable. 
>> This is item 4 of the long files, which according to the docs, should be 
>> Creation date, in seconds. 
>> 
>> Bypassing the conversion, this item is the same for all the files in my 
>> target folder (some created yesterday & some weeks ago). It has the value 
>> 2212122496, which LiveCode converts (reliably!) to 2040,2,6,6,28,16,2.
>> 
>> Printing out the long files for one of the files in the target folder shows… 
>> 
>> filename,2055,0,2212122496,1620675773,2212122496,0,501,20,600,ttxtTEXT
>> 
>> This same weird value is being returned for the Creation Date (item 4) & 
>> Last Access date (item 6), though the Last Modified Date (item 5) looks 
>> correct.
>> 
>> Any clues?   
>> Best,
>> Keith
>> 
>>> On 11 May 2021, at 13:09, Martin Koob via use-livecode 
>>>  wrote:
>>> 
>>> Hi Keith
>>> 
>>> I just tried the following
>>> 
>>> on mouseup
>>> 
>>> convert the seconds to dateitems
>>> 
>>> put it
>>> 
>>> end mouseup
>>> 
>>> The result is 2021,5,11,7,52,5,3  So that is correct.
>>> 
>>> Where is the value in your tCreateDate variable from.  Maybe there was a 
>>> miscalculation there.
>>> 
>>> Martin
>>> 
 On May 11, 2021, at 6:44 AM, Keith Clarke via use-livecode 
  wrote:
 
 Hi folks,
 What am I doing wrong with convert tCreateDate from seconds to dateItems… 
 
 I’m pulling the long files of files I created yesterday on a Mac and 
 attempting to convert the creation date. 
 
 Whatever date type I choose, LiveCode reckons yesterday was in the year 
 2040. Did I oversleep?
 Thanks
 Keith
 ___
 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
>>> 
>>> ___
>>> 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
>> 
>> 
>> ___
>> 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
> 
> 
> ___
> 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

___
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


Re: LiveCode convert seconds to dateItems - year is out by 19?

2021-05-11 Thread Terence Heaford via use-livecode
Could it be something to do with the base date on the mac vs the base date of 
live code?

I believe the base date on a mac is 1970, not sure what it is in live code?

Terry

> On 11 May 2021, at 13:59, Keith Clarke via use-livecode 
>  wrote:
> 
> Thanks Martin & Alex,
> 
> I wasn’t aware of ‘the seconds’ - thanks that’s behaving correctly here. 
> 
> Tracing back from this date conversion being OK to the tCreateDate variable. 
> This is item 4 of the long files, which according to the docs, should be 
> Creation date, in seconds. 
> 
> Bypassing the conversion, this item is the same for all the files in my 
> target folder (some created yesterday & some weeks ago). It has the value 
> 2212122496, which LiveCode converts (reliably!) to 2040,2,6,6,28,16,2.
> 
> Printing out the long files for one of the files in the target folder shows… 
> 
> filename,2055,0,2212122496,1620675773,2212122496,0,501,20,600,ttxtTEXT
> 
> This same weird value is being returned for the Creation Date (item 4) & Last 
> Access date (item 6), though the Last Modified Date (item 5) looks correct.
> 
> Any clues?   
> Best,
> Keith
> 
>> On 11 May 2021, at 13:09, Martin Koob via use-livecode 
>>  wrote:
>> 
>> Hi Keith
>> 
>> I just tried the following
>> 
>> on mouseup
>> 
>>  convert the seconds to dateitems
>> 
>>  put it
>> 
>> end mouseup
>> 
>> The result is 2021,5,11,7,52,5,3  So that is correct.
>> 
>> Where is the value in your tCreateDate variable from.  Maybe there was a 
>> miscalculation there.
>> 
>> Martin
>> 
>>> On May 11, 2021, at 6:44 AM, Keith Clarke via use-livecode 
>>>  wrote:
>>> 
>>> Hi folks,
>>> What am I doing wrong with convert tCreateDate from seconds to dateItems… 
>>> 
>>> I’m pulling the long files of files I created yesterday on a Mac and 
>>> attempting to convert the creation date. 
>>> 
>>> Whatever date type I choose, LiveCode reckons yesterday was in the year 
>>> 2040. Did I oversleep?
>>> Thanks
>>> Keith
>>> ___
>>> 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
>> 
>> ___
>> 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
> 
> 
> ___
> 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


___
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


Re: LiveCode convert seconds to dateItems - year is out by 19?

2021-05-11 Thread Keith Clarke via use-livecode
Thanks Martin & Alex,

I wasn’t aware of ‘the seconds’ - thanks that’s behaving correctly here. 

Tracing back from this date conversion being OK to the tCreateDate variable. 
This is item 4 of the long files, which according to the docs, should be 
Creation date, in seconds. 

Bypassing the conversion, this item is the same for all the files in my target 
folder (some created yesterday & some weeks ago). It has the value 2212122496, 
which LiveCode converts (reliably!) to 2040,2,6,6,28,16,2.

Printing out the long files for one of the files in the target folder shows… 

filename,2055,0,2212122496,1620675773,2212122496,0,501,20,600,ttxtTEXT

This same weird value is being returned for the Creation Date (item 4) & Last 
Access date (item 6), though the Last Modified Date (item 5) looks correct.
 
Any clues?   
Best,
Keith

> On 11 May 2021, at 13:09, Martin Koob via use-livecode 
>  wrote:
> 
> Hi Keith
> 
> I just tried the following
> 
> on mouseup
> 
>   convert the seconds to dateitems
> 
>   put it
> 
> end mouseup
> 
> The result is 2021,5,11,7,52,5,3  So that is correct.
> 
> Where is the value in your tCreateDate variable from.  Maybe there was a 
> miscalculation there.
> 
> Martin
> 
>> On May 11, 2021, at 6:44 AM, Keith Clarke via use-livecode 
>>  wrote:
>> 
>> Hi folks,
>> What am I doing wrong with convert tCreateDate from seconds to dateItems… 
>> 
>> I’m pulling the long files of files I created yesterday on a Mac and 
>> attempting to convert the creation date. 
>> 
>> Whatever date type I choose, LiveCode reckons yesterday was in the year 
>> 2040. Did I oversleep?
>> Thanks
>> Keith
>> ___
>> 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
> 
> ___
> 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


___
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


Re: LiveCode convert seconds to dateItems - year is out by 19?

2021-05-11 Thread Martin Koob via use-livecode
Hi Keith

I just tried the following

on mouseup

   convert the seconds to dateitems

   put it

end mouseup

The result is 2021,5,11,7,52,5,3  So that is correct.

Where is the value in your tCreateDate variable from.  Maybe there was a 
miscalculation there.

Martin

> On May 11, 2021, at 6:44 AM, Keith Clarke via use-livecode 
>  wrote:
> 
> Hi folks,
> What am I doing wrong with convert tCreateDate from seconds to dateItems… 
> 
> I’m pulling the long files of files I created yesterday on a Mac and 
> attempting to convert the creation date. 
> 
> Whatever date type I choose, LiveCode reckons yesterday was in the year 2040. 
> Did I oversleep?
> Thanks
> Keith
> ___
> 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

___
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


Re: LiveCode convert seconds to dateItems - year is out by 19?

2021-05-11 Thread Alex Tweedly via use-livecode

I doubt it :-)  As a useless piece of info, it works OK for me.

I'd suggest printing out the tCreateDate and "the seconds" so you can 
compare.


Or, put the seconds into tCreateDate and convert it, just to see.

Alex.

On 11/05/2021 11:44, Keith Clarke via use-livecode wrote:

Hi folks,
What am I doing wrong with convert tCreateDate from seconds to dateItems…

I’m pulling the long files of files I created yesterday on a Mac and attempting 
to convert the creation date.

Whatever date type I choose, LiveCode reckons yesterday was in the year 2040. 
Did I oversleep?
Thanks
Keith
___
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


___
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


LiveCode convert seconds to dateItems - year is out by 19?

2021-05-11 Thread Keith Clarke via use-livecode
Hi folks,
What am I doing wrong with convert tCreateDate from seconds to dateItems… 

I’m pulling the long files of files I created yesterday on a Mac and attempting 
to convert the creation date. 

Whatever date type I choose, LiveCode reckons yesterday was in the year 2040. 
Did I oversleep?
Thanks
Keith
___
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