diff --git a/init.go b/init.go new file mode 100644 index 0000000..5c0487b --- /dev/null +++ b/init.go @@ -0,0 +1,4 @@ +package q5 + +func init() { +} diff --git a/sysutils.go b/sysutils.go index e88aa58..5281c1b 100644 --- a/sysutils.go +++ b/sysutils.go @@ -8,10 +8,18 @@ import ( "reflect" ) -func GetDaySeconds(seconds int64) int64 { +func GetTimeZone() int64 { return 0 } +func GetDaySeconds(seconds int64) int64 { + return GetDaySecondsEx(seconds, GetTimeZone()) +} + +func GetDaySecondsEx(seconds int64, timeZone int64) int64 { + return ((seconds + timeZone * 3600)/3600/24 + 1) * 3600 * 24 - 3600 * timeZone; +} + func GetTickCount() int64 { return time.Now().UnixNano() / 1e6 }