Working with seconds, what am I missing?

Kay C Lan lan.kc.macmail at gmail.com
Mon Apr 23 04:47:00 EDT 2012


What always happens.

On a Mac, when you set it up it will ask you where you live and give you a
map, from the Time Zone tab of the Date & Time preference pane to click on.
Once you provided the answer, and assuming you've given it the correct time
to start with, it will calculate UTC (politically correct version of GMT).
>From then on, even if you don't update the system or connect it to the
internet it will adjust for daylight savings if your region has such a
thing.

Of course if you never update the system or connect it to the internet,
should your region decide to change the date that daylight savings starts
and finished on, your computer will no longer change to/from daylight
savings time appropriately.

HTH

On Mon, Apr 23, 2012 at 4:34 PM, Richmond <richmondmathewson at gmail.com>wrote:

> What happens if you do a "put the seconds" on a computer
> that is not internet connected?
>
>
>  Andy,
>>
>> As you've discovered seconds is based on GMT so it will cause differences
>> based on everyone's system settings, there are work arounds as suggested
>> but it may be easier just to:
>>
>> put the date into tDate
>> convert tDate to dateItems
>> put tDate
>>
>> The output will always be YYYY,MM,DD,HH,MM,SS,day of week, and if you
>> haven't included a time then, YYYY,MM,DD,0,0,0,day of week.
>>
>> Regardless of the system setting, the GMT correction, or personal
>> preferences, you can always correctly determine the local date and time of
>> a users computer using dateItems.
>>
>> HTH
>>
>> On Mon, Apr 23, 2012 at 4:55 AM, Andrew Henshaw<henshaw at me.com>  wrote:
>>
>>  Trying to work with seconds to avoid format issues with dates in
>>> different
>>> countries I keep running into this issue,  and im probably just missing
>>> something very obvious!
>>>
>>> Using the following simple code today (the 22nd April)..
>>>
>>>   put the date into tDate
>>>   convert tDate to seconds
>>>   put tDate
>>>
>>> Returns 1335049200
>>>
>>> Id expect to get a result of 22nd April,  but instead Ive fed that in to
>>> a
>>> few online UNIX time converters and they all return Sat, 21 Apr 2012
>>> 23:00:00 GMT which is an hour into the previous day.
>>>
>>> Im assuming its something to do with GMT / daylight savings time,  but is
>>> there a reliable way to get and use the seconds.  Id like to ensure the
>>> values stored are correct.
>>>
>>> Andy
>>> ______________________________**_________________
>>> 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<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<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<http://lists.runrev.com/mailman/listinfo/use-livecode>
>



More information about the use-livecode mailing list