I can access the Rhino Sun date and time in Python in Rhino or in Python in Grasshopper with this simple code.
from Rhino import RhinoDoc as rhdoc from System import DateTime as datetime sun = rhdoc.ActiveDoc.Lights.Sun DT = sun.GetDateTime
but if i try to print DT it just returns
<built-in method GetDateTime of Sun Object at 0x00000000000002c>
Unlike when i print the sun vector and it returns the vector
I realise i may need to convert the system time to a formatted string, but not had much luck with that using system.datetime methods I just get runtime errors, that the built-in function or method has no attribute when it give it DT
Here’s the link to the RhinoCommon API (Working in Rhino V5 mind)