EvanHolt
|
  |
| Joined: 06 Sep 2008 |
| Total Posts: 1264 |
|
|
| 24 Aug 2015 01:59 PM |
| What would be the best way, if there even is a way, to check the date on someone's computer? |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2015 02:01 PM |
| os.time() on a local script |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2015 02:02 PM |
| tick, not os.time, i think |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2015 02:03 PM |
@Legit
Nah I think using os.time() will return the machines version of os.time() time zone and what not includedddd
|
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 24 Aug 2015 02:08 PM |
tick()
I think MrNicNac has a module for this |
|
|
| Report Abuse |
|
|
EvanHolt
|
  |
| Joined: 06 Sep 2008 |
| Total Posts: 1264 |
|
|
| 24 Aug 2015 02:10 PM |
I think os.time() would work. Can someone explain how I could use it to check the date?
[ George Orwell taught me math! 2 + 2 = 5 ] |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 24 Aug 2015 02:10 PM |
| os.time() gets the amount of seconds since epoch in UTC. If you want to take into account of time zones, use tick() |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2015 02:15 PM |
A quick google gave me this horrid looking code... good luck :P
TIMEZONE=-5 DST=0
dm={31,28,31,30,31,30,31,31,30,31,30,31}
while true do t=tick() y=math.floor(1970+ t /31556926) ds=((1970+t/31556926)-y)*31556926 m=math.floor(ds/2629743)+1 d=math.floor(ds/86400)+1 md=math.floor(((ds/2629743+1)-m)*dm[m])+1 wd=d%7+6 if(m11)then DST=0 else DST=1 end if(m==3)then if(md>=14)then DST=1 else DST=0 end end if(m==11)then if(md>=7)then DST=0 else DST=1 end end h=math.floor(math.fmod(t,60*60*24)/3600) + 5 + (TIMEZONE) + (DST) mn= math.floor(math.fmod(t,60*60*24)/60 - 60*(h-DST)) s= math.floor(math.fmod(math.fmod(t,60*60*24),60)) wait(1) end |
|
|
| Report Abuse |
|
|