Page 1 of 1

Clock Widget - adjust time?

Posted: Tue Jun 07, 2016 4:26 pm
by sims
Playing with LC 8.0.2

Clock Widget is off by one hour.
Do such widgets have any means to adjust them?

sims

Re: Clock Widget - adjust time?

Posted: Tue Jun 07, 2016 6:01 pm
by bn
Hi Jim,

either choose the Properties Inspector and choose a timezone that reflects your timezone plus daylight saving if applicable

For me living in UTC + 1 + daylight saving = UTC + 2

or use a script

Code: Select all

on mouseUp
   put the last word of the internet date into tTime -- something like "+0200"
   put tTime * 36 into tOffset -- to get to the seconds offset from UTC
   set the timeZone of widget "Clock" to tOffset
end mouseUp
internet date has the current offset from UTC for your system clock, including daylight saving if in effect.

Kind regards
Bernd

Re: Clock Widget - adjust time?

Posted: Tue Jun 07, 2016 9:09 pm
by bn
This corrects for time zones that have additional 30 minutes offset from UTC

Code: Select all

on mouseUp
   put the last word of the internet date into tTime -- something like "+0200"
   if char - 2 of tTime = 3 then put 5 into char - 2 of tTime -- catch half hour offset like India, New Territories AUS
   put tTime * 36 into tOffset -- to get to the seconds offset from UTC
   set the timeZone of widget "Clock" to tOffset
end mouseUp
Kind regards
Bernd

Re: Clock Widget - adjust time?

Posted: Wed Jun 08, 2016 10:41 pm
by bn
Hi Jim,

atually there are some bugs in the Clock widget. That is why the local time is not settable as it should.

http://quality.livecode.com/show_bug.cgi?id=17373

I hope that it will be fixed soon.

But with the workaround above it works right now.

Kind regards
Bernd