company logo

Time :: toUnixTime - Set unix time from time value

The function returns a Unix timestamp from the time value. As date 'today' is assumed.

When true has been passed in bLocalTime , the time value is considered as local time and will be converted to Greenwich mean time (UTC) before storing the ODABA time value.

Return value:  Unix time stamp ( int64  )

The unix timestamp contains the number of seconds since 1.1.1970 0:00:00 (UTC), which is an absolute timestamp that might be converted into local time.

Implementation overview

Implementation details

  1. Get unix standard time from local time
    int64 Time  :: toUnixTime ( bool bLocalTime )

    When true has been passed in bLocalTime , the value is considered as local time and will be converted to Greenwich standard time (UTC).

    When passing false in bLocalTime , no conversion takes place and it is up to the application interpreting the value as local or standard time.

    • bLocalTime - Local or standard time

      The option indicates, that a time value or timestamp contains local time ( true ) or Greenwich standard time ( false ).

  2. to list
  3. Get unix timestamp
    int64 Time  :: toUnixTime (  )

    The function returns the Unix timestamp from the current ODABA time. It is up to the application interpreting the value as local or standard time.

  4. to list