admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Quintiq file version 2.0
#parent: #root
Method UpdateCalendars (
  structured[LibCal_Calendar] calendars_i
) id:Method_LibCal_dlgCalendarSettings_UpdateCalendars
{
  #keys: '[131094.1.614804225]'
  Body:
  [*
    // Update the calendars with the changes.
    base            :=         dtBase.DateTime();
    updateInterval  :=         durUpdateInterval.Duration();
    windowNrOfDays  := [Number]edtWindow .Text();
    historyNrOfDays := [Number]edtHistory.Text();
    
    if( TimeZone::HasTimeZoneSupport() )
    {
      // Compensate for the behavior of the DateTime-control of the Base.
      timezone := dhCalendar.Data().GetTimeZone();
      base     := base - timezone.RawOffset() + LibCal_GlobalState.GetLocalTimeZone().RawOffset();
    }
    
    LibCal_CalendarRegistry::UpdateCalendars( calendars_i,
                                              base, updateInterval,
                                              windowNrOfDays, historyNrOfDays );
  *]
}