FLTK logo

Re: [fltk.general] Fl_Calendar

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Fl_Calendar "anmol.... May 05, 2021  
 
Is that
auto m = e_mon + SECSPERDAY * 7;
to
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:
Yeah
I tried the fix proposed by spitzak. It seems to work.
Thanks everybody for comments.

Jer'

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 :

https://github.com/nikego/Fl_Calendar 
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 fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/37bc7cc5-475b-49fb-a7b8-b377c65e8fabn%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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