| Quintiq file version 2.0 | 
| #parent: #root | 
| Method DetermineStartOfEvent ( | 
|   DateTime baseTime_i, | 
|   TimeZone timezone_i | 
| ) as DateTime id:Method_LibCal_GlobalState_DetermineStartOfEvent | 
| { | 
|   #keys: '[131094.1.1247784008]' | 
|   Body: | 
|   [* | 
|     // Determine the starttime of an event based on a baseTime_i (for example a ContextMenuTime). | 
|     // Is implemented in this method so that it is possible to change the behavior in all relevant places | 
|     // in the same way in one go by changing this method. | 
|     start := baseTime_i.Round( Duration::Minutes( 30 ) ); | 
|      | 
|     // When running in days only mode, set the start to the start of the day. | 
|     if( LibCal_Event::USE_ONLY_DAYS() ) | 
|     { | 
|       start := start.StartOfDay( timezone_i ); | 
|     } | 
|      | 
|     return start; | 
|   *] | 
| } |