lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



Hi guys, i still cannot apply the concept that Kein recommends.
Pls analize this results:

----------
myHour = os.time( { year="2008", month="01", day="01", hour="00", min="00" })
ts = math.fmod(myHour, 86400)
print (myHour .." - ".. ts)


myHour = os.time( { year="2009", month="01", day="00", hour="00", min="00" })
ts = math.fmod(myHour, 86400)
print (myHour .." - ".. ts)
----------
output: 
1199152800 - 7200
1230688800 - 7200


it continues to return "7200" if i change the year (it is what we expect) but it returns
different values to different months values. see this

----------
myHour = os.time( { year="2008", month="01", day="01", hour="00", min="00" })
ts = math.fmod(myHour, 86400)
print (myHour .." - ".. ts)


myHour = os.time( { year="2009", month="07", day="00", hour="00", min="00" })
ts = math.fmod(myHour, 86400)
print (myHour .." - ".. ts)
----------
output: 
199152800 - 7200
1246330800 - 10800


is it because of the locale ? 
do you have any example to set UTC locale ? (i coudnt find an example)


any idea ?

thanks
have a nice weekend,

diego


















What can you do with the new Windows Live? Find out