File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -180,11 +180,14 @@ function (SetupBoardToolchain boards_namespace board_id generate_dir)
180180 endif ()
181181 properties_set_value("ard_global" "runtime.os" "${ARDUINO_BOARD_HOST_NAME} " )
182182
183- # Set some extra properties
184- if (${CMAKE_HOST_UNIX} )
185- execute_process (COMMAND "date" "+%s" OUTPUT_VARIABLE EPOCH)
186- properties_set_value("ard_global" "extra.time.local" "${EPOCH} " )
187- endif ()
183+ # Set extra.time.* properties
184+ string (TIMESTAMP epoch_local "%s" )
185+ properties_set_value("ard_global" "extra.time.local" "${epoch_local} " )
186+ string (TIMESTAMP epoch_utc "%s" UTC)
187+ properties_set_value("ard_global" "extra.time.utc" "${epoch_utc} " )
188+ math (EXPR zone "${epoch_local} - ${epoch_utc} " )
189+ properties_set_value("ard_global" "extra.time.zone" "${zone} " )
190+ properties_set_value("ard_global" "extra.time.dst" "0" ) # Don't know how to get this
188191
189192 # Packager of the selected board
190193 _board_get_platform_property("/pkg_id" pkg_id)
You can’t perform that action at this time.
0 commit comments