And got this problem on a system in Washington DC (03/08/2015, 03/09/2015) and on another in France (03/29/2015, 03/30/2015)…
#! /bin/lc
local tDay
local tFst
-- put the long date into tDay
-- put "03/29/2015" into tDay
put "03/30/2015" into tDay
put "01/01/" into tFst
put word 1 to -1 of item 3 of the long date after tFst
convert tFst to seconds
convert tDay to seconds
put (tDay-tFst)/86400+1
03/29 => 88
03/30 => 88.958333
The number of seconds for a day is 24 (h) x 60 (min) x 60 (s) = 86400.
Where is the missing part? (1-0.958333)*86400 =~ 3600s = 1h
With the daylight saving the 03/08 (in Washington) and the 03/29 (in France) have only 23 hours.
I fix this with :
put trunc((gDay-tFst+3600)/86400+1)
In hope this could help
