[mod]
This commit is contained in:
parent
94485919a7
commit
49b0da5f5b
2 changed files with 16 additions and 1 deletions
|
@ -60,7 +60,14 @@ function datetime_from_date_object(
|
|||
},
|
||||
options
|
||||
);
|
||||
const date_ : Date = new Date(date.getTime() + (((options.timezone_shift as int) * (60 * 60)) * 1000));
|
||||
const date_ : Date = lib_plankton.call.convey(
|
||||
date,
|
||||
[
|
||||
(x : Date) => x.getTime(),
|
||||
(x : int) => (x + (((options.timezone_shift as int) * (60 * 60)) * 1000)),
|
||||
(x : int) => new Date(x),
|
||||
]
|
||||
);
|
||||
const iso_string : string = date_.toISOString();
|
||||
return {
|
||||
"timezone_shift": (options.timezone_shift as int),
|
||||
|
|
|
@ -244,6 +244,7 @@ async function calendar_gather_events(
|
|||
"headers": {},
|
||||
"body": null,
|
||||
};
|
||||
// TODO: cache?
|
||||
const http_response : lib_plankton.http.type_response = await lib_plankton.http.call(
|
||||
http_request,
|
||||
{
|
||||
|
@ -291,6 +292,13 @@ async function calendar_gather_events(
|
|||
.filter(
|
||||
(event) => (event !== null)
|
||||
)
|
||||
.filter(
|
||||
(event) => pit_is_between(
|
||||
pit_from_datetime(event.begin),
|
||||
from_pit,
|
||||
to_pit
|
||||
)
|
||||
)
|
||||
.map(
|
||||
(event) => ({"calendar_id": calendar_id, "event": event})
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue