A bunch of fixes
This commit is contained in:
1 parent
65534ecfd5
commit
2a4e03e611
20 files changed
+146
-160
No files matched your search
+14
-2
@@ -22,10 +22,22 @@ func (s *Session) CreatedAtLocal() string {
|
||||
return s.CreatedAt.Local().Format("2006-01-02 15:04")
|
||||
}
|
||||
|
||||
func (s *Session) ExpiresAtLocal() string {
|
||||
return s.ExpiresAt.Local().Format("2006-01-02 15:04")
|
||||
}
|
||||
|
||||
func (i *Invite) CreatedAtLocal() string {
|
||||
return i.CreatedAt.Local().Format("2006-01-02 15:04")
|
||||
}
|
||||
|
||||
func (i *Invite) ExpiresAtLocal() string {
|
||||
return i.ExpiresAt.Local().Format("2006-01-02 15:04")
|
||||
}
|
||||
|
||||
func (s *Session) IsValid() bool {
|
||||
return time.Now().Before(s.ExpiresAt)
|
||||
return time.Now().UTC().Before(s.ExpiresAt)
|
||||
}
|
||||
|
||||
func (i *Invite) IsValid() bool {
|
||||
return time.Now().Before(i.ExpiresAt) && i.Uses > 0
|
||||
return time.Now().UTC().Before(i.ExpiresAt) && i.Uses > 0
|
||||
}
|
||||
Reference in new issue
Block a user