fix time format (iso) for json serialization
This commit is contained in:
parent
084af78841
commit
2466111488
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ func (data *WeatherData) OnlyQueriedValues(query *WeatherQuery) *WeatherData {
|
||||||
func (data *WeatherData) ToMap() map[string]interface{} {
|
func (data *WeatherData) ToMap() map[string]interface{} {
|
||||||
mappedData := map[string]interface{}{
|
mappedData := map[string]interface{}{
|
||||||
SensorId: data.SensorId.String(),
|
SensorId: data.SensorId.String(),
|
||||||
TimeStamp: data.TimeStamp.String(),
|
TimeStamp: data.TimeStamp.Format(time.RFC3339),
|
||||||
}
|
}
|
||||||
|
|
||||||
for sensorValueType, value := range data.Values {
|
for sensorValueType, value := range data.Values {
|
||||||
|
|
Loading…
Add table
Reference in a new issue