[Gambas-user] Time Didn't Spring Forward in Example

Fabien Bodard gambasfr at ...11...
Sat Nov 5 22:08:42 CET 2005


Le Samedi 5 Novembre 2005 21:37, A Person a écrit :
> Saturday, 5 November 2005
>
> Good Day All . . .
>
> I have another problem with time. I want to import the clock example
> into my PIM but the clock example (#2 in the list) runs exactly one hour
> earlier than my displayed system time.
>
> For example, it is now 16:55:38 Daylight Saving Time but the clock
> displays 15:55:38 (approximately).
>
> The problem is really compounded when I use the Analog Watch / Clock
> example (#1 in the list). It displays the true time.
>
> I think the clock example is missing something. Debugging someone else's
> app is not my strong point.
>
> Can someone on Daylight Saving Time and KDE 3.4.2 and Gambas 1.0.11
> check it out and offer me a solution.
>
> Thanks.
>
> Paul
>

Hi paul,

I think it's not a bug but a feature !  :-D

replace the line :
tmpImg = picHour.Rotate(Hour(Now) * 360 / 12)

by

tmpImg = picHour.Rotate((Hour(Now) * 360 / 12) + (Minute(Now) * 360 / 60 / 
12))

it set the hour relative to the minute... i think it correct your problem

Regards,
Fabien Bodard





More information about the User mailing list