Convert date to seconds
Dar Scott
dsc at swcp.com
Thu Jul 18 14:13:42 EDT 2013
We might be saying the same thing, but I'm not sure.
on mouseUp
get the short date
convert it to seconds
put it & tab & it/3600 mod 24
end mouseUp
gives me this:
1374127200 6
I'm in MDT (Rocky Mountains), somebody in California might take those same seconds and convert to a short date and get something other than today, the 18th. Or is it Florida?
Dar
On Jul 18, 2013, at 12:01 PM, Andrew Kluthe wrote:
> it gets midnight UTC, livecode changing the date FROM the time zone
> independent seconds gives you time zone differences.
>
>
> On Thu, Jul 18, 2013 at 12:48 PM, Dar Scott <dsc at swcp.com> wrote:
>
>> I think it is the UTC seconds thing. I think that changing a date to
>> seconds will get midnight of the day for the current time zone. Somebody
>> in an more westerly timezone might see those seconds and the date will be
>> earlier.
>>
>> If it is on only one computer and the timezone will not change, then you
>> might be OK.
>>
>> The dateItems format for convert might be handy for coming up with a file
>> name format.
>>
>> Dar
>>
>> On Jul 18, 2013, at 9:56 AM, Thomas McGrath III wrote:
>>
>>> That's weird. I still get the 16th. Can anyone else confirm the 15th?
>> (not doubting you Dar)
>>>
>>> I might have to change this then…
>>>
>>> Tom
>>>
>>> -- Tom McGrath III
>>> http://lazyriver.on-rev.com
>>> mcgrath3 at mac.com
>>>
>>> On Jul 18, 2013, at 12:39 AM, Dar Scott <dsc at swcp.com> wrote:
>>>
>>>>
>>>> On Jul 17, 2013, at 7:03 PM, Thomas McGrath III wrote:
>>>>
>>>>> I am converting the short date (08/16/13) to seconds and I get
>> 1376625600
>>>>
>>>> When I converted it back earlier today, I got the 15th. I guess there
>> is a problem related to timezones or something.
>>>>
>>>> Consider NAMEyyyymmdd. It is easy to parse. It lists in order. It is
>> somewhat readable. It is two characters shorter.
>>>>
>>>> Dar
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Regards,
>
> Andrew Kluthe
> andrew at ctech.me
> _______________________________________________
> 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