LiveCode convert seconds to dateItems - year is out by 19?
keith.clarke at me.com
Tue May 11 08:59:49 EDT 2021
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…
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.
> On 11 May 2021, at 13:09, Martin Koob via use-livecode <use-livecode at lists.runrev.com> 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.
>> On May 11, 2021, at 6:44 AM, Keith Clarke via use-livecode <use-livecode at lists.runrev.com> 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?
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode