Click or drag to resize

SunSetDateTime Method

Set the observer's date and time. kind specifies the kind of date and time to set to the sun. Note that this is distinct from the DateTimeKind of 'time' which has nothing to do with the sun's local/UTC scenario. - If 'kind' is DateTimeKind.Local, the sun's local time will be set, i.e., the time you see in the UI under 'Local'. This is the preferred way to use this function. - If 'kind' is DateTimeKind.Utc, the sun's UTC time will be set, i.e., the time you see in the UI under 'UTC'. This is only for completeness; it's not likely to be useful, but if you do use it, be aware that the sun will convert this time to local using its currently set time zone and daylight saving information (not the locale's information). Caveat: Local sun time is to do with the Sun's time zone and not the time zone of the computer. Caveat: If the supplied DateTime object has a kind of Local, it will be used verbatim. If, however, it has a kind of Utc, it will be converted to local time on the computer using the computer's time zone and daylight saving locale information before being passed to the sun. To avoid confusion, it's best to always use DateTimes with Kind 'Local' when setting the sun's date and time. This is because the Sun's time zone is nothing to do with the actual computer's time zone.

Namespace:  Rhino.Render
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 6.0
Syntax
public void SetDateTime(
	DateTime time,
	DateTimeKind kind
)

Parameters

time
Type: SystemDateTime

[Missing <param name="time"/> documentation for "M:Rhino.Render.Sun.SetDateTime(System.DateTime,System.DateTimeKind)"]

kind
Type: SystemDateTimeKind

[Missing <param name="kind"/> documentation for "M:Rhino.Render.Sun.SetDateTime(System.DateTime,System.DateTimeKind)"]

See Also