DateTime (IDateTime80)

The IDateTime80 interface provides you with date and time related features. It exposes control over the time and date, time mode, time range,  time zone settings, and sun display. Changes made using this interface apply only to the current state of the project and are not saved when the Fly file is saved. To make changes that are saved in the project, use IProject80.Settings.

 

 

Properties

 

Current

Gets and sets the currently used global date and time.

CurrentTimeBuffer

Gets and sets the time range of the Date and Time slider.

DisplaySun

Gets and sets a Boolean that determines whether to use the sun as a light source.

FixedLocalTime

Sets sunlight display on the terrain based on a specific selected time.

TimeRangeEnd

Gets and sets the range end date and time.

TimeRangeStart

Gets and sets the range start date and time.

TimeZoneDisplayName

Gets a description of the currently used time zone, e.g., "(GMT-09:00) Alaska".

TimeZoneKey

Gets and sets a key of the used time zone, e.g., "Alaska Standard Time".

TimeZoneMode

Gets and sets the currently used time zone.

TimeZonesXML

Gets an XML that defines the available time zones in the operating system.

 

Methods

 

SetMode

Sets the date and time mode.

Current

Gets and sets the currently used global date and time. SeeTime” for information on valid formats for this property.

 

JavaScript

 

Current

 

C#

 

dynamic Current { get; set; }

 

C++

 

HRESULT Current([out, retval] VARIANT* pVal)

HRESULT Current([in] VARIANT pVal)

 

CurrentTimeBuffer

Gets and sets the time range in seconds of the Date and Time slider.

 

JavaScript

 

CurrentTimeBuffer

 

C#

 

int CurrentTimeBuffer { get; set; }

 

C++

 

HRESULT CurrentTimeBuffer ([out, retval] long* pSeconds)

HRESULT CurrentTimeBuffer ([in] long pSeconds)

 

DisplaySun

Gets and sets a Boolean that indicates whether the sun is used the sun as a light source.

 

JavaScript

 

DisplaySun

 

C#

 

bool DisplaySun { get; set; }

 

C++

 

HRESULT DisplaySun([out, retval] VARIANT_BOOL* pVal)

HRESULT DisplaySun([in] VARIANT_BOOL pVal)

FixedLocalTime

Gets and sets a fixed time at the viewer position. The time slider is set to this time and sunlight on the terrain corresponds to the position of the sun at this time on the current date. SeeTime” for information on valid formats for this property.

 

JavaScript

 

FixedLocalTime

 

C#

 

dynamic FixedLocalTime { get; set; }

 

C++

 

HRESULT FixedLocalTime([out, retval] VARIANT* pVal)

HRESULT FixedLocalTime([in] VARIANT pVal)

TimeRangeEnd

Gets and sets the range end date and time. SeeTime” for information on valid formats for this property.

 

JavaScript

 

TimeRangeEnd

 

C#

 

dynamic TimeRangeEnd { get; set; }

 

C++

 

HRESULT TimeRangeEnd([out, retval] VARIANT* pVal)

HRESULT TimeRangeEnd([in] VARIANT pVal)

TimeRangeStart

Gets and sets the range start date and time. SeeTime” for information on valid formats for this property.

 

JavaScript

 

TimeRangeStart

 

C#

 

dynamic TimeRangeStart { get; set; }

 

C++

 

HRESULT TimeRangeStart([out, retval] VARIANT* pVal)

HRESULT TimeRangeStart([in] VARIANT pVal)

TimeZoneDisplayName

Gets a description of the currently used time zone, e.g., "(GMT-09:00) Alaska". The string corresponds to the value of the OPTION node in the XML returned from TimeZonesXML.

.

JavaScript

 

TimeZoneDisplayName

 

C#

 

string TimeZoneDisplayName { get; }

 

C++

 

HRESULT TimeZoneDisplayName([out, retval] BSTR* pVal)

TimeZoneKey

Gets and sets a key of the used time zone, e.g., "Alaska Standard Time". The key can be one of the VALUE attributes of an OPTION node in the XML returned from TimeZonesXML.

 

JavaScript

 

TimeZoneKey

 

C#

 

string TimeZoneKey { get; set; }

 

C++

 

HRESULT TimeZoneKey([out, retval] BSTR* pVal)

HRESULT TimeZoneKey([in] BSTR pVal)

TimeZoneMode

Gets and sets the currently used time zone type. The following are its enumerations:

§   TIME_ZONE_TYPE_MY_COMPUTER = 0
Use the computer local time zone.

§   TIME_ZONE_TYPE_UTC = 1
Use UTC time.

§   TIME_ZONE_TYPE_SPECIFIC = 2
Use a specified time zone. The time zone can be set with TimeZoneKey or TimeZoneDisplayName.

 

JavaScript

 

TimeZoneMode

 

C#

 

TimeZoneType TimeZoneMode { get; set; }

 

C++

 

HRESULT TimeZoneMode([out, retval] TimeZoneType* pVal)

HRESULT TimeZoneMode([in] TimeZoneType pVal)

TimeZonesXML

Gets an XML that defines the available time zones in the operating system. For example:

<SELECT ID="TimeZoneList" SIZE="XX">

<OPTION VALUE ="Alaska Standard Time">(GMT-09:00) Alaska<OPTION>

. . .

<SELECT>.

 

JavaScript

 

TimeZonesXML

 

C#

 

string TimeZonesXML { get; }

 

C++

 

HRESULT TimeZonesXML([out, retval] BSTR* pVal)

SetMode

This method sets the time and date slider mode.

 

JavaScript

 

SetMode(Mode)

 

C#

 

void SetMode(SliderDisplayMode Mode)

 

C++

 

HRESULT SetMode(SliderDisplayMode Mode)

 

Parameters

Mode

An enum that determines the date and time slider mode. The following are possible values:

·          MODE_TIME_NONE = 0
Reserved.

·          MODE_FIXED_TIME = 1
Always use a fixed time at the viewer position that can be set using the FixedLocalTime property.

·          MODE_TIME = 2
Always use a fixed time that can be set using the IProject80.Settings.property.

·          MODE_RANGE_PROJECT = 4
Use range according to project.

·          MODE_RANGE_CUSTOM = 8
Discontinued. Do not use.

·          Use a custom range that can be set using the TimeRangeStart and TimeRangeEnd properties.

·          MODE_ADJUST_FOR_GROUP = 16
Automatically adjust range to selected group. You can use this flag in combination with the MODE_FIXED_TIME or MODE_TIME values.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.