[Gambas-user] [Gambas Bug Tracker] Bug #1097: Date.ToUnixTime loses a day
bugtracker at ...3416...
bugtracker at ...3416...
Fri Apr 28 18:21:42 CEST 2017
http://gambaswiki.org/bugtracker/edit?object=BUG.1097&from=L21haW4-
Comment #2 by T. Lee DAVIDSON:
The output I get is:
04/25/2017 20:53:43
04/28/2017 12:07:32
04/27/2017 12:07:32
Lines 1 & 2 are correct at local time (GMT-4)
Line 3 is a day behind.
With the following:
Dim sEpochSeconds As String
Shell "date +%s" To sEpochSeconds
Print Trim(sEpochSeconds)
Print Date.ToUnixTime(Now)
I get:
1493396203
1493309803
The Date.ToUnixTime(Now) value is exactly 86400 seconds (24 hrs) less.
More information about the User
mailing list