Problem with converting time

Michael Doub mikedoub at
Fri Mar 17 18:52:30 EDT 2017

Sorry Mark and Richard.   Here is the real code snipit that includes a 
hack that seems to work:

if not(theenvironmentisamongtheitems"development,standalone 
application") then
     subtract(4*60*60) fromit
end if
convertit todateitems

Mark, in your situation, you and the server are in the same timezone so 
I would not expect to see a problem.   I have no idea where my server 
is, but it must not be in my timezone.  I am guessing on the west coast 
since taking off 4 hours seems to fix the problem.

It still does not make any sense why a timezone comes into play at all.

Here is the silly little app:   Http://   It has 
been really cold  here the last few days and I was not able to cycle, so 
this was a fun diversion.  Seems to work, but it has not had much 
testing.  And as you can see I know next to nothing about making things 
look nice in html.

-= Mike

On 3/17/17 4:42 PM, Mark Wieder via use-livecode wrote:
> On 03/17/2017 01:20 PM, Michael Doub via use-livecode wrote:
>> Sorry guys, I must not have been clear in my statement of the problem.
>> Here is the code:
>> put 1489755600 into tVar
>> convert tVar into dateitems
>>  -- on the mac tVar contains 2017,3,17,9,0,0,6
>>  -- on the server tVar contains 2017,3,17,12,0,0,6
>> The local time should not be involved since you are converting a fixed
>> value.  What is happening?
> Sorry - I can't replicate that.
> With the desktop and server engines running on the same machine,
> put 1489755600 into tVar
> convert tVar into dateitems
> gives me
> IDE message box: 2017,3,17,6,0,0,6
> server:          2017,3,17,6,0,0,6
> Note that "convert into" is not supported.
> It might be better to post the code you're actually using.

More information about the Use-livecode mailing list