Re: [fltk.general] Fl_Calendar

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
Previous Message ]New Message | Reply ]Next Message ]

Re: Fl_Calendar "anmol.... 06:26 May 05 top right image
Is that
auto m = e_mon + SECSPERDAY * 7;
auto m = e_mon + SECSPERDAY * 7 + SECSPERDAY /2;

I dont quite understand the code, so any other changes ?

On Thursday, April 1, 2021 at 6:10:22 AM UTC+5:30  wrote:
I tried the fix proposed by spitzak. It seems to work.
Thanks everybody for comments.


Le mercredi 31 mars 2021 à 18:13:08 UTC+2, spitzak a écrit :
A real quick fix is to add 12 hours to the time so it figures out what day contains noon+n*24 rather than midnight+n*24, which will not change when daylight savings time turns on/off.

On Wed, Mar 31, 2021 at 6:58 AM : 
As someone else suspected, it might have to do with daylight saving
changes. Similar issues appear around end of October.

A quick glance at Nikita's code shows:

#define SECSPERDAY (60 * 60 * 24)

Day calculations in update_table() are performed by adding SECSPERDAY as delta seconds and using localtime() to find the date. This will be thrown off by time changes.

You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Direct Link to Message ]
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]

Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.