Present times in configured timezone
This commit is contained in:
parent
0de7ca4bef
commit
fefd4af10c
@ -54,14 +54,14 @@ func (dp DatapointValue) Value() any { // {{{
|
||||
}
|
||||
|
||||
if dp.ValueDateTime.Valid {
|
||||
return dp.ValueDateTime.Time
|
||||
return dp.ValueDateTime.Time.In(smonConfig.timezoneLocation)
|
||||
}
|
||||
|
||||
return nil
|
||||
} // }}}
|
||||
func (dp DatapointValue) FormattedTime() string { // {{{
|
||||
if dp.ValueDateTime.Valid {
|
||||
return dp.ValueDateTime.Time.Format("2006-01-02 15:04:05")
|
||||
return dp.ValueDateTime.Time.In(smonConfig.timezoneLocation).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
return "invalid time"
|
||||
} // }}}
|
||||
|
Loading…
Reference in New Issue
Block a user