@@ -33,8 +33,6 @@ func GetCurrentFormattedTimeSimple() string {
3333 return time .Now ().UTC ().Format ("2006-01-02 15:04:05 +0000 UTC" )
3434}
3535
36-
37-
3836// EpochToTime converts a unix epoch (seconds) into a formatted time string "2006-01-02 15:04:05".
3937// The resulting time is in UTC.
4038func EpochToTime (epoch int64 ) string {
@@ -52,13 +50,12 @@ func TimeToEpoch(input string) int64 {
5250 return t .Unix ()
5351}
5452
55-
5653// NowFormats returns the current time in all supported formats.
5754func NowFormats () map [string ]string {
5855 now := time .Now ().UTC ()
5956 return map [string ]string {
60- "UnixSeconds" : time .Unix (now .Unix (), 0 ).Format ("2006-01-02 15:04:05" ) + " (epoch: " +
61- time .Unix (now .Unix (), 0 ).UTC ().Format ("2006-01-02 15:04:05" ) + ")" ,
57+ "UnixSeconds" : time .Unix (now .Unix (), 0 ).Format ("2006-01-02 15:04:05" ) + " (epoch: " +
58+ time .Unix (now .Unix (), 0 ).UTC ().Format ("2006-01-02 15:04:05" ) + ")" ,
6259 "UnixSecondsRaw" : time .Unix (now .Unix (), 0 ).UTC ().Format ("2006-01-02 15:04:05" ),
6360 "UnixSecondsInt" : formatInt (now .Unix ()),
6461 "UnixMilliseconds" : formatInt (now .UnixMilli ()),
@@ -71,4 +68,4 @@ func NowFormats() map[string]string {
7168// Helper: format int64 as string
7269func formatInt (val int64 ) string {
7370 return time .Unix (0 , val ).UTC ().Format ("2006-01-02 15:04:05" )
74- }
71+ }
0 commit comments