Contenuto principale

Epoch Time to DateTime

Convert epoch time to DateTime signal

Since R2024b

  • Epoch Time to DateTime block icon

Description

The Epoch Time to DateTime block converts the epoch time to a DateTime signal.

Limitations

The DateTime blocks are available only as an internal feature with early access. Their design is subject to change.

Ports

Input

expand all

Epoch time, specified as a scalar.

Data Types: double | int32 | uint32 | fixed point

Output

expand all

Value of DateTime signal, returned as a scalar.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Choose the data type for the output. The type can be specified directly as Simulink.DateTimeType() or expressed as a Simulink.DateTimeType data type object.

  • Simulink.DateTimeType(Name,value)

  • Simulink.DateTimeType(datetime type name)

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: OutDataTypeStr
Values: Simulink.DateTimeType() (default) | <data type expression>

Select the category of data to specify.

  • DateTimeSimulink.DateTimeType() data types.

  • Expression — Expressions that evaluate to data types. Selecting Expression enables a second text box to the right, where you can enter the expression.

For more information, see Specify Data Types Using Data Type Assistant.

Select the time point:

  • Seconds since Unix epoch

  • Seconds since NTP epoch

  • Seconds since TAI epoch

  • Julian date

  • Modified Julian date

  • J2000.0 date

For more information, see Specify Data Types Using Data Type Assistant.

Select the DateTime storage data type:

  • double

  • int32

  • uint32

  • fixdt(0,64,32)

  • fixdt(1,64,32)

  • fixdt(0,128,64)

  • fixdt(1,128,64)

Select the DateTime time standard:

  • TAI

  • UTC

  • TAI

  • TDB

Version History

Introduced in R2024b