generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Getting computer's date?

Previous Thread :: Next Thread 
EvanHolt is not online. 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
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
24 Aug 2015 02:01 PM
os.time() on a local script
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
24 Aug 2015 02:02 PM
tick, not os.time, i think
Report Abuse
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
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 is not online. 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 is not online. 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 is not online. 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
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image