Esempio n. 1
0
// String makes a string representation of the structure
func (he HistoryEntry) String() string {
	timestamp := utils.ConvertTimestamp(he.timestamp).Format(time.RFC3339)
	return fmt.Sprintf("HistoryEntry{number=%d command=\"%s\" timestamp=\"%s\" hasHistory=%t}",
		he.number, he.command, timestamp, he.hasHistory)
}
Esempio n. 2
0
// FormatTimeStamp is just a small wrapper around FormatTime method.
func (e *Environment) FormatTimeStamp(timestamp int64) string {
	return e.FormatTime(utils.ConvertTimestamp(timestamp))
}
Esempio n. 3
0
// GetTime returns a time structure of the history entry.
func (he HistoryEntry) GetTime() *time.Time {
	return utils.ConvertTimestamp(he.timestamp)
}