In the following code the scenes do not get the right date and time they always return the date the model shadow information has for date and time when running the script.
E.g. the model says 2020-10-01 12:30:00 +0200 then this time is always return for ShadowTime.
Some help would be very nice
# Get the model
model = Sketchup.active_model
# Get the pages for the active model
pages = model.pages
# Loop over the existing pages
while (pages.length > 0)
pages.erase(pages[0])
end
# Define the days per month
days_in_month = [31,28,31,30,31,30,31,31,30,31,30,31]
# Create the scenes - One for every day at noon
for month in 1..1
for day in 1..days_in_month[month-1]
date = DateTime.new(2020,month,day,14,00,00,"UTC+2")
page = pages.add date.strftime("%Y-%m-%d %H:%M:%S %z")
page.use_shadow_info = false
page.shadow_info["ShadowTime"] = date
page.shadow_info["DisplayShadows"] = true
page.use_shadow_info = true
puts page.shadow_info["ShadowTime"] , date.strftime("%Y-%m-%d %H:%M:%S %z")
end
end