Skip to content

Commit af79cd7

Browse files
author
Federico Fissore
committed
Fixed wrong int to string conversion
Signed-off-by: Federico Fissore <[email protected]>
1 parent 35bdf40 commit af79cd7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Diff for: src/arduino.cc/builder/setup_build_properties.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"arduino.cc/builder/types"
3535
"arduino.cc/builder/utils"
3636
"path/filepath"
37+
"strconv"
3738
"strings"
3839
"time"
3940
)
@@ -108,10 +109,10 @@ func (s *SetupBuildProperties) Run(context map[string]interface{}) error {
108109
}
109110

110111
now := time.Now()
111-
buildProperties[constants.BUILD_PROPERTIES_EXTRA_TIME_UTC] = string(now.Unix())
112-
buildProperties[constants.BUILD_PROPERTIES_EXTRA_TIME_LOCAL] = string(utils.LocalUnix(now))
113-
buildProperties[constants.BUILD_PROPERTIES_EXTRA_TIME_ZONE] = string(utils.TimezoneOffset())
114-
buildProperties[constants.BUILD_PROPERTIES_EXTRA_TIME_DST] = string(utils.DaylightSavingsOffset(now))
112+
buildProperties[constants.BUILD_PROPERTIES_EXTRA_TIME_UTC] = strconv.FormatInt(now.Unix(), 10)
113+
buildProperties[constants.BUILD_PROPERTIES_EXTRA_TIME_LOCAL] = strconv.FormatInt(utils.LocalUnix(now), 10)
114+
buildProperties[constants.BUILD_PROPERTIES_EXTRA_TIME_ZONE] = strconv.Itoa(utils.TimezoneOffset())
115+
buildProperties[constants.BUILD_PROPERTIES_EXTRA_TIME_DST] = strconv.Itoa(utils.DaylightSavingsOffset(now))
115116

116117
context[constants.CTX_BUILD_PROPERTIES] = buildProperties
117118

0 commit comments

Comments
 (0)