Commit 87fab296 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Use UTC as timezone for CRON runtime function timestamp input

parent 280d5317
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
### Fixed
- Haystack leaderboard record listings now return correct results around both sides of the pivot record.
- Haystack leaderboard record listings now return a complete page even when the pivot record is at the end of the leaderboard.
- CRON expression runtime function now correctly uses UTC as the timezone for input timestamps.

## [1.0.2] - 2017-09-29
### Added
+1 −1
Original line number Diff line number Diff line
@@ -431,7 +431,7 @@ func (n *NakamaModule) cronNext(l *lua.LState) int {
		l.ArgError(1, "expects a valid cron string")
		return 0
	}
	t := time.Unix(ts, 0)
	t := time.Unix(ts, 0).UTC()
	next := expr.Next(t)
	nextTs := next.UTC().Unix()
	l.Push(lua.LNumber(nextTs))