time anomaly

Jim Ault JimAultWins at yahoo.com
Fri Aug 19 20:01:03 EDT 2005


I get the current hour on my computer, "00" minutes, and 54 seconds.

with twelvehourtime true => 4:00:54, and false => 16:00:54

using 4 => 16:00:04
using 124 => 16:02:04  (124 seconds past the current hour)
using 3600 => 17:00:00 (3600 seconds, or 60 min past the current hour)

thus if using only seconds, the function returns the time x seconds after
the top of the current hour.  Wonder how you could used this?  Perhaps in
programming a clock.

Jim Ault
Las Vegas



On 8/19/05 12:41 PM, "Brian Yennie" <briany at qldlearning.com> wrote:

> This is a guess, but I believe it would be because:
> 
> "The seconds function returns the total number of seconds since
> midnight, January 1, 1970 GMT"
> 
> Assuming your timezone is at GMT-5 hours, you are seeing 54 seconds
> past January 1, 1970 GMT, otherwise known as December 31, 1969 @
> 19:00:54
> 
> HTH,
> Brian
> 
>> Any idea why this code produces "19:00:54" instead of "54"? I do have
>> twelveHourTime set to false, but...
>> 
>> on mouseUp
>>  local t
>>  put 54 into t
>>  convert t to long time
>>  answer t
>> end mouseUp
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list